Linux Input/HID development
 help / color / mirror / Atom feed
From: Ross Martin <ross@bitbybitsp.com>
To: linux-input@vger.kernel.org
Cc: rydberg@bitmath.org
Subject: [PATCH 001/001] hid: Fix for Lenovo Yoga Book 9i top screen
Date: Tue, 2 Sep 2025 13:54:13 -0700	[thread overview]
Message-ID: <7e2f3193-a1c0-4e08-9a57-840d718919a7@bitbybitsp.com> (raw)

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 <ross@bitbybitsp.com>


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


                 reply	other threads:[~2025-09-02 20:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e2f3193-a1c0-4e08-9a57-840d718919a7@bitbybitsp.com \
    --to=ross@bitbybitsp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=rydberg@bitmath.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox