Re: [PATCH v5] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver
From: Dave Carey
Date: Mon Jun 08 2026 - 15:13:12 EST
Hi Hans,
Confirmed: on the YB9, both lenovo-ymc and yb9-kbdock register input
nodes with SW_TABLET_MODE in their capability bitmap (SW=2 in
/proc/bus/input/devices). You are right that this is a problem
regardless of which one fires events -- GNOME reads the capability at
startup.
The recommended fix would be: add a DMI blocklist to lenovo_ymc_probe()
to return early on the Yoga Book 9, matching on:
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "83KJ"),
That leaves yb9-kbdock as the sole SW_TABLET_MODE source on this
hardware.
Two questions on how you'd like to proceed:
1. Should the lenovo-ymc fix come as a standalone patch, or would you
prefer a v6 2-patch series with the ymc change as patch 1/2 and the
kbdock driver as patch 2/2?
2. For the early return in probe(): you suggested "return 0" to avoid
WMI framework error messages. That requires a NULL guard in
lenovo_ymc_notify() since priv is never set in that path. Is that
the right approach, or would you prefer a different pattern?
Thanks,
Dave