aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 07:22:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 07:22:30 -0400
commit5b372600ccf1116701e96cf593559a60c9bee7e0 (patch)
tree5d1a209e3209743a1ae52cbf4831cfbaa0ace5af
parent73dec82d8d2b2c6c9c9a66a1c8daae3fcd71d602 (diff)
parent9ff3541e3ddf96800ce8fcd225c9e7956da49418 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Jiri writes: "HID fixes: - hantick touchpad fix from Anisse Astier - device ID addition for Ice Lake mobile from Srinivas Pandruvada - touchscreen resume fix for certain i2c-hid driven devices from Hans de Goede" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: intel-ish-hid: Enable Ice Lake mobile HID: i2c-hid: Remove RESEND_REPORT_DESCR quirk and its handling HID: i2c-hid: disable runtime PM operations on hantick touchpad
-rw-r--r--drivers/hid/hid-ids.h1
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c27
-rw-r--r--drivers/hid/intel-ish-hid/ipc/hw-ish.h1
-rw-r--r--drivers/hid/intel-ish-hid/ipc/pci-ish.c1
4 files changed, 12 insertions, 18 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 f3076659361a..4e3592e7a3f7 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -47,7 +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 51
52/* flags */ 52/* flags */
53#define I2C_HID_STARTED 0 53#define I2C_HID_STARTED 0
@@ -169,9 +169,8 @@ static const struct i2c_hid_quirks {
169 { USB_VENDOR_ID_WEIDA, USB_DEVICE_ID_WEIDA_8755, 169 { USB_VENDOR_ID_WEIDA, USB_DEVICE_ID_WEIDA_8755,
170 I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV }, 170 I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
171 { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288, 171 { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
172 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET }, 172 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET |
173 { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH, 173 I2C_HID_QUIRK_NO_RUNTIME_PM },
174 I2C_HID_QUIRK_RESEND_REPORT_DESCR },
175 { 0, 0 } 174 { 0, 0 }
176}; 175};
177 176
@@ -1105,7 +1104,9 @@ static int i2c_hid_probe(struct i2c_client *client,
1105 goto err_mem_free; 1104 goto err_mem_free;
1106 } 1105 }
1107 1106
1108 pm_runtime_put(&client->dev); 1107 if (!(ihid->quirks & I2C_HID_QUIRK_NO_RUNTIME_PM))
1108 pm_runtime_put(&client->dev);
1109
1109 return 0; 1110 return 0;
1110 1111
1111err_mem_free: 1112err_mem_free:
@@ -1130,7 +1131,8 @@ static int i2c_hid_remove(struct i2c_client *client)
1130 struct i2c_hid *ihid = i2c_get_clientdata(client); 1131 struct i2c_hid *ihid = i2c_get_clientdata(client);
1131 struct hid_device *hid; 1132 struct hid_device *hid;
1132 1133
1133 pm_runtime_get_sync(&client->dev); 1134 if (!(ihid->quirks & I2C_HID_QUIRK_NO_RUNTIME_PM))
1135 pm_runtime_get_sync(&client->dev);
1134 pm_runtime_disable(&client->dev); 1136 pm_runtime_disable(&client->dev);
1135 pm_runtime_set_suspended(&client->dev); 1137 pm_runtime_set_suspended(&client->dev);
1136 pm_runtime_put_noidle(&client->dev); 1138 pm_runtime_put_noidle(&client->dev);
@@ -1236,22 +1238,13 @@ static int i2c_hid_resume(struct device *dev)
1236 1238
1237 /* Instead of resetting device, simply powers the device on. This 1239 /* Instead of resetting device, simply powers the device on. This
1238 * solves "incomplete reports" on Raydium devices 2386:3118 and 1240 * solves "incomplete reports" on Raydium devices 2386:3118 and
1239 * 2386:4B33 1241 * 2386:4B33 and fixes various SIS touchscreens no longer sending
1242 * data after a suspend/resume.
1240 */ 1243 */
1241 ret = i2c_hid_set_power(client, I2C_HID_PWR_ON); 1244 ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
1242 if (ret) 1245 if (ret)
1243 return ret; 1246 return ret;
1244 1247
1245 /* Some devices need to re-send report descr cmd
1246 * after resume, after this it will be back normal.
1247 * otherwise it issues too many incomplete reports.
1248 */
1249 if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {
1250 ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);
1251 if (ret)
1252 return ret;
1253 }
1254
1255 if (hid->driver && hid->driver->reset_resume) { 1248 if (hid->driver && hid->driver->reset_resume) {
1256 ret = hid->driver->reset_resume(hid); 1249 ret = hid->driver->reset_resume(hid);
1257 return ret; 1250 return ret;
diff --git a/drivers/hid/intel-ish-hid/ipc/hw-ish.h b/drivers/hid/intel-ish-hid/ipc/hw-ish.h
index da133716bed0..08a8327dfd22 100644
--- a/drivers/hid/intel-ish-hid/ipc/hw-ish.h
+++ b/drivers/hid/intel-ish-hid/ipc/hw-ish.h
@@ -29,6 +29,7 @@
29#define CNL_Ax_DEVICE_ID 0x9DFC 29#define CNL_Ax_DEVICE_ID 0x9DFC
30#define GLK_Ax_DEVICE_ID 0x31A2 30#define GLK_Ax_DEVICE_ID 0x31A2
31#define CNL_H_DEVICE_ID 0xA37C 31#define CNL_H_DEVICE_ID 0xA37C
32#define ICL_MOBILE_DEVICE_ID 0x34FC
32#define SPT_H_DEVICE_ID 0xA135 33#define SPT_H_DEVICE_ID 0xA135
33 34
34#define REVISION_ID_CHT_A0 0x6 35#define REVISION_ID_CHT_A0 0x6
diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
index a1125a5c7965..256b3016116c 100644
--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
+++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
@@ -38,6 +38,7 @@ static const struct pci_device_id ish_pci_tbl[] = {
38 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CNL_Ax_DEVICE_ID)}, 38 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CNL_Ax_DEVICE_ID)},
39 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, GLK_Ax_DEVICE_ID)}, 39 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, GLK_Ax_DEVICE_ID)},
40 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CNL_H_DEVICE_ID)}, 40 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, CNL_H_DEVICE_ID)},
41 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, ICL_MOBILE_DEVICE_ID)},
41 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, SPT_H_DEVICE_ID)}, 42 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, SPT_H_DEVICE_ID)},
42 {0, } 43 {0, }
43}; 44};