Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: multitouch: new device class fix Lenovo X12 trackpad sticky

The trackpad of the given device sends continuous report of pointers
status as per wxn8 spec. However, the spec did not clarify when the
fingers are lifted so fast that between the interval of two report
frames fingers on pad reduced from >=2 to 0. The second last report
contains >=2 fingers with tip state 1 and the last report contains only
1 finger with tip state 0. Although this can happen unfrequently, a
quick fix will be improve the consistency to 100%. A quick fix is to
disable MT_QUIRK_ALWAYS_VALID and enable MT_QUIRK_NOT_SEEN_MEANS_UP.

Test for hid-tools is added in [1]

In addition to this, I2C device 04CA:00B1 may also need similar class
but with MT_QUIRK_FORCE_MULTI_INPUT disabled (but it does not harm to
enable it on non-multi-input device either). The respective owner has
been notified and a patch may coming soon after test.

[1]: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/130

Signed-off-by: Tao Jin <tao-j@outlook.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Tao Jin and committed by
Jiri Kosina
54eed5c7 38158384

+12 -1
+12 -1
drivers/hid/hid-multitouch.c
··· 194 194 #define MT_CLS_WIN_8_FORCE_MULTI_INPUT 0x0015 195 195 #define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016 196 196 #define MT_CLS_WIN_8_NO_STICKY_FINGERS 0x0017 197 + #define MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU 0x0018 197 198 198 199 /* vendor specific classes */ 199 200 #define MT_CLS_3M 0x0101 ··· 286 285 MT_QUIRK_STICKY_FINGERS | 287 286 MT_QUIRK_WIN8_PTP_BUTTONS | 288 287 MT_QUIRK_FORCE_MULTI_INPUT, 288 + .export_all_inputs = true }, 289 + { .name = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU, 290 + .quirks = MT_QUIRK_IGNORE_DUPLICATES | 291 + MT_QUIRK_HOVERING | 292 + MT_QUIRK_CONTACT_CNT_ACCURATE | 293 + MT_QUIRK_STICKY_FINGERS | 294 + MT_QUIRK_WIN8_PTP_BUTTONS | 295 + MT_QUIRK_FORCE_MULTI_INPUT | 296 + MT_QUIRK_NOT_SEEN_MEANS_UP, 289 297 .export_all_inputs = true }, 290 298 { .name = MT_CLS_WIN_8_DISABLE_WAKEUP, 291 299 .quirks = MT_QUIRK_ALWAYS_VALID | ··· 793 783 case HID_DG_CONFIDENCE: 794 784 if ((cls->name == MT_CLS_WIN_8 || 795 785 cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT || 786 + cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU || 796 787 cls->name == MT_CLS_WIN_8_DISABLE_WAKEUP) && 797 788 (field->application == HID_DG_TOUCHPAD || 798 789 field->application == HID_DG_TOUCHSCREEN)) ··· 2046 2035 USB_DEVICE_ID_LENOVO_X1_TAB3) }, 2047 2036 2048 2037 /* Lenovo X12 TAB Gen 1 */ 2049 - { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT, 2038 + { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU, 2050 2039 HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8, 2051 2040 USB_VENDOR_ID_LENOVO, 2052 2041 USB_DEVICE_ID_LENOVO_X12_TAB) },