[PATCH 001/001] hid: Fix for Lenovo Yoga Book 9i top screen
From: Ross Martin <hidden>
Date: 2025-09-02 20:54:17
Issue: The current multitouch detection causes the Lenovo Yoga Book 9i to be detected as type MT_CLS_WIN_8. This has MT_QUIRK_CONTACT_CNT_ACCURATE set, which causes the touchscreen to recognize only a single touch, not multitouch. This patch creates a unique type MT_CLS_LENOVO_YOGA_BOOK_9I for this laptop, with MT_QUIRK_CONTACT_CNT_ACCURATE removed. The result is that multitouch works properly on the top screen. This laptop has two screens, and the bottom one still doesn't work. Partial progress. Note that this patch defines MT_CLS_LENOVO_YOGA_BOOK_9I as 0x0115, making it the next in the sequence of IDs. There is a possible issue if other patches have gone in and also use 0x0115. The number may need to be adjusted. Signed-off-by: Ross Martin <redacted> START OF PATCH diff -rup linux-orig/drivers/hid/hid-ids.h linux/drivers/hid/hid-ids.h
--- linux-orig/drivers/hid/hid-ids.h 2025-09-02 12:56:48.870143225 -0700
+++ linux/drivers/hid/hid-ids.h 2025-09-02 13:17:55.987704096 -0700@@ -837,6 +837,7 @@ #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6093 0x6093 #define USB_DEVICE_ID_LENOVO_LEGION_GO_DUAL_DINPUT 0x6184 #define USB_DEVICE_ID_LENOVO_LEGION_GO2_DUAL_DINPUT 0x61ed +#define USB_DEVICE_ID_LENOVO_YOGA_BOOK_9I 0x6161 #define USB_VENDOR_ID_LETSKETCH 0x6161 #define USB_DEVICE_ID_WP9620N 0x4d15
diff -rup linux-orig/drivers/hid/hid-multitouch.c linux/drivers/hid/hid-multitouch.c
--- linux-orig/drivers/hid/hid-multitouch.c 2025-09-02 12:56:48.874143269 -0700
+++ linux/drivers/hid/hid-multitouch.c 2025-09-02 13:18:51.722450468
-0700@@ -222,6 +222,8 @@ static void mt_post_parse(struct mt_devi #define MT_CLS_RAZER_BLADE_STEALTH 0x0112 #define MT_CLS_SMART_TECH 0x0113 #define MT_CLS_APPLE_TOUCHBAR 0x0114 +#define MT_CLS_LENOVO_YOGA_BOOK_9I 0x0115 + #define MT_CLS_SIS 0x0457 #define MT_DEFAULT_MAXCONTACT 10
@@ -413,6 +415,14 @@ static const struct mt_class mt_classes[ MT_QUIRK_APPLE_TOUCHBAR, .maxcontacts = 11, }, + { .name = MT_CLS_LENOVO_YOGA_BOOK_9I, + .quirks = MT_QUIRK_ALWAYS_VALID | + MT_QUIRK_IGNORE_DUPLICATES | + MT_QUIRK_HOVERING | + MT_QUIRK_STICKY_FINGERS | + MT_QUIRK_WIN8_PTP_BUTTONS, + .export_all_inputs = true, + }, { .name = MT_CLS_SIS, .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | MT_QUIRK_ALWAYS_VALID |
@@ -2388,6 +2398,11 @@ static const struct hid_device_id mt_dev HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
USB_VENDOR_ID_GOOGLE,
USB_DEVICE_ID_GOOGLE_WHISKERS) },
+ /* Lenovo Yogo Book 9i (adds support for top screen of two screens) */
+ { .driver_data = MT_CLS_LENOVO_YOGA_BOOK_9I,
+ HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_LENOVO,
+ USB_DEVICE_ID_LENOVO_YOGA_BOOK_9I) },
+
/* sis */
{ .driver_data = MT_CLS_SIS,
HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_SIS_TOUCH,
END OF PATCH
--
Ross Martin
Bit by Bit Signal Processing LLC
ross@bitbybitsp.com
+1-623-487-8011