|
48 | 48 | #define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0)
|
49 | 49 | #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
|
50 | 50 | #define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
|
| 51 | +#define I2C_HID_QUIRK_RESET_ON_RESUME BIT(5) |
51 | 52 |
|
52 | 53 | /* flags */
|
53 | 54 | #define I2C_HID_STARTED 0
|
@@ -174,6 +175,8 @@ static const struct i2c_hid_quirks {
|
174 | 175 | I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
|
175 | 176 | { USB_VENDOR_ID_ELAN, HID_ANY_ID,
|
176 | 177 | I2C_HID_QUIRK_BOGUS_IRQ },
|
| 178 | + { USB_VENDOR_ID_ALPS_JP, HID_ANY_ID, |
| 179 | + I2C_HID_QUIRK_RESET_ON_RESUME }, |
177 | 180 | { 0, 0 }
|
178 | 181 | };
|
179 | 182 |
|
@@ -1214,8 +1217,15 @@ static int i2c_hid_resume(struct device *dev)
|
1214 | 1217 | * solves "incomplete reports" on Raydium devices 2386:3118 and
|
1215 | 1218 | * 2386:4B33 and fixes various SIS touchscreens no longer sending
|
1216 | 1219 | * data after a suspend/resume.
|
| 1220 | + * |
| 1221 | + * However some ALPS touchpads generate IRQ storm without reset, so |
| 1222 | + * let's still reset them here. |
1217 | 1223 | */
|
1218 |
| - ret = i2c_hid_set_power(client, I2C_HID_PWR_ON); |
| 1224 | + if (ihid->quirks & I2C_HID_QUIRK_RESET_ON_RESUME) |
| 1225 | + ret = i2c_hid_hwreset(client); |
| 1226 | + else |
| 1227 | + ret = i2c_hid_set_power(client, I2C_HID_PWR_ON); |
| 1228 | + |
1219 | 1229 | if (ret)
|
1220 | 1230 | return ret;
|
1221 | 1231 |
|
|
0 commit comments