HI Jiri, Ok. I see. I will do simple vid/pid filter to see if it's weida's controller. Send the extra command if the answer is true. hn.chen ________________________________________ From: Jiri Kosina [jikos@xxxxxxxxxx] Sent: Monday, November 07, 2016 7:59 PM To: Hn Chen Cc: benjamin.tissoires@xxxxxxxxxx; dmitry.torokhov@xxxxxxxxx; linux-input@xxxxxxxxxxxxxxx Subject: RE: [PATCH] HID: i2c-hid: add retry in set power for fixing weida's issue On Mon, 7 Nov 2016, Hn Chen wrote: > Since I don't have any experience to add a quirk, may I have a sample > code for reference ? It should be a HID quirk, right ? Generic HID quirk might be over-stretching it, as i2c_hid_set_power() is being called from various places, so generalizing this requirement out into HID core wouldn't be clean either. You can special-case this behavior by looking at wVendorID / wProductID / wVersionID from the report descriptor, can't you? There is not a quirk mechanism for i2c-hid yet. If things start exploding like in usb-hid space, we'd definitely want to have a generic quirk mechanism one day. But if this has been a single case over the existence of the hid-over-i2c, I wouldn't bother (yet). -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html