aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-09-19 14:52:45 -0400
committerJiri Kosina <jkosina@suse.cz>2018-09-24 05:15:01 -0400
commitafbb1169ed5b58cfca017e368b53e019cf285853 (patch)
treeba219da32ac925bfcdbe7c0a540ddabbde70b976
parent807588ac92018bde88a1958f546438e840eb0158 (diff)
HID: i2c-hid: Remove RESEND_REPORT_DESCR quirk and its handling
Commit 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system resume") removes the need for the RESEND_REPORT_DESCR quirk for Raydium devices, but kept it for the SIS device id 10FB touchscreens, as the author of that commit could not determine if the quirk is still necessary there. I've tested suspend/resume on a Toshiba Click Mini L9W-B which is the device for which this quirk was added in the first place and with the "Don't reset device upon system resume" fix the quirk is no longer necessary, so this commit removes it. Note even better I also had some other devices with SIS touchscreens which suspend/resume issues, where the RESEND_REPORT_DESCR quirk did not help. I've also tested these devices with the "Don't reset device upon system resume" fix and I'm happy to report that that fix also fixes touchscreen resume on the following devices: Asus T100HA Asus T200TA Peaq C1010 Cc: Kai-Heng Feng <kai.heng.feng@canonical.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-ids.h1
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c18
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 5146ee029db4..bc49909aba8e 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -976,7 +976,6 @@
976#define USB_DEVICE_ID_SIS817_TOUCH 0x0817 976#define USB_DEVICE_ID_SIS817_TOUCH 0x0817
977#define USB_DEVICE_ID_SIS_TS 0x1013 977#define USB_DEVICE_ID_SIS_TS 0x1013
978#define USB_DEVICE_ID_SIS1030_TOUCH 0x1030 978#define USB_DEVICE_ID_SIS1030_TOUCH 0x1030
979#define USB_DEVICE_ID_SIS10FB_TOUCH 0x10fb
980 979
981#define USB_VENDOR_ID_SKYCABLE 0x1223 980#define USB_VENDOR_ID_SKYCABLE 0x1223
982#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07 981#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index a8610f5bf6f5..4e3592e7a3f7 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -47,8 +47,7 @@
47/* quirks to control the device */ 47/* quirks to control the device */
48#define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0) 48#define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0)
49#define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1) 49#define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
50#define I2C_HID_QUIRK_RESEND_REPORT_DESCR BIT(2) 50#define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(2)
51#define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(3)
52 51
53/* flags */ 52/* flags */
54#define I2C_HID_STARTED 0 53#define I2C_HID_STARTED 0
@@ -172,8 +171,6 @@ static const struct i2c_hid_quirks {
172 { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288, 171 { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
173 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET | 172 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET |
174 I2C_HID_QUIRK_NO_RUNTIME_PM }, 173 I2C_HID_QUIRK_NO_RUNTIME_PM },
175 { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH,
176 I2C_HID_QUIRK_RESEND_REPORT_DESCR },
177 { 0, 0 } 174 { 0, 0 }
178}; 175};
179 176
@@ -1241,22 +1238,13 @@ static int i2c_hid_resume(struct device *dev)
1241 1238
1242 /* Instead of resetting device, simply powers the device on. This 1239 /* Instead of resetting device, simply powers the device on. This
1243 * solves "incomplete reports" on Raydium devices 2386:3118 and 1240 * solves "incomplete reports" on Raydium devices 2386:3118 and
1244 * 2386:4B33 1241 * 2386:4B33 and fixes various SIS touchscreens no longer sending
1242 * data after a suspend/resume.
1245 */ 1243 */
1246 ret = i2c_hid_set_power(client, I2C_HID_PWR_ON); 1244 ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
1247 if (ret) 1245 if (ret)
1248 return ret; 1246 return ret;
1249 1247
1250 /* Some devices need to re-send report descr cmd
1251 * after resume, after this it will be back normal.
1252 * otherwise it issues too many incomplete reports.
1253 */
1254 if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {
1255 ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);
1256 if (ret)
1257 return ret;
1258 }
1259
1260 if (hid->driver && hid->driver->reset_resume) { 1248 if (hid->driver && hid->driver->reset_resume) {
1261 ret = hid->driver->reset_resume(hid); 1249 ret = hid->driver->reset_resume(hid);
1262 return ret; 1250 return ret;