Skip to content

Commit 52cf93e

Browse files
khfengJiri Kosina
authored andcommitted
HID: i2c-hid: Don't reset device upon system resume
Raydium touchscreen triggers interrupt storm after system-wide suspend: [ 179.085033] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/65535) According to Raydium, Windows driver does not reset the device after system resume. The HID over I2C spec does specify a reset should be used at intialization, but it doesn't specify if reset is required for system suspend. Tested this patch on other i2c-hid touchpanels I have and those touchpanels do work after S3 without doing reset. If any regression happens to other touchpanel vendors, we can use quirk for Raydium devices. There's still one device uses I2C_HID_QUIRK_RESEND_REPORT_DESCR so keep it there. Cc: Aaron Ma <[email protected]> Cc: AceLan Kao <[email protected]> Signed-off-by: Kai-Heng Feng <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent ade573e commit 52cf93e

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

drivers/hid/hid-ids.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,6 @@
530530
#define I2C_VENDOR_ID_HANTICK 0x0911
531531
#define I2C_PRODUCT_ID_HANTICK_5288 0x5288
532532

533-
#define I2C_VENDOR_ID_RAYD 0x2386
534-
#define I2C_PRODUCT_ID_RAYD_3118 0x3118
535-
#define I2C_PRODUCT_ID_RAYD_4B33 0x4B33
536-
537533
#define USB_VENDOR_ID_HANWANG 0x0b57
538534
#define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000
539535
#define USB_DEVICE_ID_HANWANG_TABLET_LAST 0x8fff

drivers/hid/i2c-hid/i2c-hid.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,8 @@ static const struct i2c_hid_quirks {
170170
I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
171171
{ I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
172172
I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
173-
{ I2C_VENDOR_ID_RAYD, I2C_PRODUCT_ID_RAYD_3118,
174-
I2C_HID_QUIRK_RESEND_REPORT_DESCR },
175173
{ USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH,
176174
I2C_HID_QUIRK_RESEND_REPORT_DESCR },
177-
{ I2C_VENDOR_ID_RAYD, I2C_PRODUCT_ID_RAYD_4B33,
178-
I2C_HID_QUIRK_RESEND_REPORT_DESCR },
179175
{ 0, 0 }
180176
};
181177

@@ -1237,11 +1233,16 @@ static int i2c_hid_resume(struct device *dev)
12371233
pm_runtime_enable(dev);
12381234

12391235
enable_irq(client->irq);
1240-
ret = i2c_hid_hwreset(client);
1236+
1237+
/* Instead of resetting device, simply powers the device on. This
1238+
* solves "incomplete reports" on Raydium devices 2386:3118 and
1239+
* 2386:4B33
1240+
*/
1241+
ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
12411242
if (ret)
12421243
return ret;
12431244

1244-
/* RAYDIUM device (2386:3118) need to re-send report descr cmd
1245+
/* Some devices need to re-send report descr cmd
12451246
* after resume, after this it will be back normal.
12461247
* otherwise it issues too many incomplete reports.
12471248
*/

0 commit comments

Comments
 (0)