Skip to content

Commit 54eed5c

Browse files
tao-jJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 3815838 commit 54eed5c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/hid/hid-multitouch.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);
194194
#define MT_CLS_WIN_8_FORCE_MULTI_INPUT 0x0015
195195
#define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016
196196
#define MT_CLS_WIN_8_NO_STICKY_FINGERS 0x0017
197+
#define MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU 0x0018
197198

198199
/* vendor specific classes */
199200
#define MT_CLS_3M 0x0101
@@ -286,6 +287,15 @@ static const struct mt_class mt_classes[] = {
286287
MT_QUIRK_WIN8_PTP_BUTTONS |
287288
MT_QUIRK_FORCE_MULTI_INPUT,
288289
.export_all_inputs = true },
290+
{ .name = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
291+
.quirks = MT_QUIRK_IGNORE_DUPLICATES |
292+
MT_QUIRK_HOVERING |
293+
MT_QUIRK_CONTACT_CNT_ACCURATE |
294+
MT_QUIRK_STICKY_FINGERS |
295+
MT_QUIRK_WIN8_PTP_BUTTONS |
296+
MT_QUIRK_FORCE_MULTI_INPUT |
297+
MT_QUIRK_NOT_SEEN_MEANS_UP,
298+
.export_all_inputs = true },
289299
{ .name = MT_CLS_WIN_8_DISABLE_WAKEUP,
290300
.quirks = MT_QUIRK_ALWAYS_VALID |
291301
MT_QUIRK_IGNORE_DUPLICATES |
@@ -783,6 +793,7 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
783793
case HID_DG_CONFIDENCE:
784794
if ((cls->name == MT_CLS_WIN_8 ||
785795
cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT ||
796+
cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU ||
786797
cls->name == MT_CLS_WIN_8_DISABLE_WAKEUP) &&
787798
(field->application == HID_DG_TOUCHPAD ||
788799
field->application == HID_DG_TOUCHSCREEN))
@@ -2035,7 +2046,7 @@ static const struct hid_device_id mt_devices[] = {
20352046
USB_DEVICE_ID_LENOVO_X1_TAB3) },
20362047

20372048
/* Lenovo X12 TAB Gen 1 */
2038-
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
2049+
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
20392050
HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
20402051
USB_VENDOR_ID_LENOVO,
20412052
USB_DEVICE_ID_LENOVO_X12_TAB) },

0 commit comments

Comments
 (0)