]> Git Repo - J-linux.git/commitdiff
Merge tag 'hid-for-linus-20241024' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Thu, 24 Oct 2024 23:31:58 +0000 (16:31 -0700)
committerLinus Torvalds <[email protected]>
Thu, 24 Oct 2024 23:31:58 +0000 (16:31 -0700)
Pull HID fixes from Jiri Kosina:
 "Device-specific functionality quirks for Thinkpad X1 Gen3, Logitech
  Bolt and some Goodix touchpads (Bartłomiej Maryńczak, Hans de Goede
  and Kenneth Albanowski)"

* tag 'hid-for-linus-20241024' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: lenovo: Add support for Thinkpad X1 Tablet Gen 3 keyboard
  HID: multitouch: Add quirk for Logitech Bolt receiver w/ Casa touchpad
  HID: i2c-hid: Delayed i2c resume wakeup for 0x0d42 Goodix touchpad

1  2 
drivers/hid/i2c-hid/i2c-hid-core.c

index be5d342d5d13c05272377977141f85711014885f,8914c7db94718feab8e7577c185ecbf8ba1a4ef5..43664a24176fca008977b860537817b4941b950e
@@@ -36,7 -36,7 +36,7 @@@
  #include <linux/kernel.h>
  #include <linux/hid.h>
  #include <linux/mutex.h>
 -#include <asm/unaligned.h>
 +#include <linux/unaligned.h>
  
  #include <drm/drm_panel.h>
  
@@@ -50,6 -50,7 +50,7 @@@
  #define I2C_HID_QUIRK_BAD_INPUT_SIZE          BIT(3)
  #define I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET   BIT(4)
  #define I2C_HID_QUIRK_NO_SLEEP_ON_SUSPEND     BIT(5)
+ #define I2C_HID_QUIRK_DELAY_WAKEUP_AFTER_RESUME BIT(6)
  
  /* Command opcodes */
  #define I2C_HID_OPCODE_RESET                  0x01
@@@ -140,6 -141,8 +141,8 @@@ static const struct i2c_hid_quirks 
        { USB_VENDOR_ID_ELAN, HID_ANY_ID,
                 I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET |
                 I2C_HID_QUIRK_BOGUS_IRQ },
+       { I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_0D42,
+                I2C_HID_QUIRK_DELAY_WAKEUP_AFTER_RESUME },
        { 0, 0 }
  };
  
@@@ -981,6 -984,13 +984,13 @@@ static int i2c_hid_core_resume(struct i
                return -ENXIO;
        }
  
+       /* On Goodix 27c6:0d42 wait extra time before device wakeup.
+        * It's not clear why but if we send wakeup too early, the device will
+        * never trigger input interrupts.
+        */
+       if (ihid->quirks & I2C_HID_QUIRK_DELAY_WAKEUP_AFTER_RESUME)
+               msleep(1500);
        /* Instead of resetting device, simply powers the device on. This
         * solves "incomplete reports" on Raydium devices 2386:3118 and
         * 2386:4B33 and fixes various SIS touchscreens no longer sending
This page took 0.050724 seconds and 4 git commands to generate.