]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/hid/i2c-hid/i2c-hid.c
HID: i2c-hid: Don't reset device upon system resume
[mirror_ubuntu-bionic-kernel.git] / drivers / hid / i2c-hid / i2c-hid.c
index 1536e3a11a575f123d337c93ea852a77d704c22c..46037a692384e820fc8264a12d76fb79761fe41e 100644 (file)
@@ -172,7 +172,7 @@ static const struct i2c_hid_quirks {
                I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
        { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
                I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
-       { I2C_VENDOR_ID_RAYD, I2C_PRODUCT_ID_RAYD_3118,
+       { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH,
                I2C_HID_QUIRK_RESEND_REPORT_DESCR },
        { 0, 0 }
 };
@@ -1211,17 +1211,22 @@ static int i2c_hid_resume(struct device *dev)
        pm_runtime_enable(dev);
 
        enable_irq(client->irq);
-       ret = i2c_hid_hwreset(client);
+
+       /* Instead of resetting device, simply powers the device on. This
+        * solves "incomplete reports" on Raydium devices 2386:3118 and
+        * 2386:4B33
+        */
+       ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
        if (ret)
                return ret;
 
-       /* RAYDIUM device (2386:3118) need to re-send report descr cmd
+       /* Some devices need to re-send report descr cmd
         * after resume, after this it will be back normal.
         * otherwise it issues too many incomplete reports.
         */
        if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {
                ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);
-               if (!ret)
+               if (ret)
                        return ret;
        }