All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/2] platform/x86/lenovo: Yoga Book 9 keyboard dock detection
@ 2026-06-10 15:53 Dave Carey
  2026-06-10 15:53 ` [PATCH v8 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dave Carey @ 2026-06-10 15:53 UTC (permalink / raw)
  To: platform-driver-x86; +Cc: ilpo.jarvinen, hansg

Hi Ilpo,

Thank you for the v7 review.  All nine items are addressed in v8.

One item needs a brief explanation: for the mutex lifecycle, I used
__MUTEX_INITIALIZER(yb9.lock) in the struct definition rather than
devm_mutex_init().  The yb9 struct is a module-level global with no
associated device at __init time, and since yb9_kbdock_block_probe()
acquires the lock and can run before yb9_kbdock_event_probe(), the
mutex must be valid before either probe runs.  Static initialization
achieves the same goal (no manual init/destroy lifecycle) without
requiring a device pointer.  If you'd prefer a different approach,
please let me know.

Changes in v8:
  - Add #include <linux/bits.h> (required for GENMASK).
  - Add #include <linux/dev_printk.h> (explicit include for dev_warn/dev_dbg).
  - Use __MUTEX_INITIALIZER(yb9.lock) for static mutex initialization;
    removes mutex_init() call and the need for mutex_destroy().
  - Update wmidev_query_block() call to pass min_size=8; remove manual
    length check now handled by the WMI core.
  - Move u8 *data __free(kfree) declaration to immediately after the
    successful wmidev_query_block() call (cleanup.h convention).
  - Change data type from void * to u8 * to allow pointer arithmetic
    without cast.
  - Remove (int) cast from FIELD_GET() return value.
  - Remove blank line between yb9_kbdock_query_locked() call and error
    check in keyboard_position_show().
  - Use %d format specifier in sysfs_emit(); remove (unsigned int) cast.

Patch 1/2 (lenovo-ymc) is unchanged from v7.

Tested on Lenovo Yoga Book 9 14IAH10 (model 83KJ), kernel 7.0.

Dave Carey (2):
  platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10
  platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver

 .../testing/sysfs-driver-lenovo-yb9-kbdock    |  19 ++
 MAINTAINERS                                    |   7 +
 drivers/platform/x86/lenovo/Kconfig            |  14 +
 drivers/platform/x86/lenovo/Makefile           |   1 +
 drivers/platform/x86/lenovo/yb9-kbdock.c      | 312 ++++++++++++++++++
 drivers/platform/x86/lenovo/ymc.c              |  19 ++
 6 files changed, 372 insertions(+)

--
2.54.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-06-16 14:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 15:53 [PATCH v8 0/2] platform/x86/lenovo: Yoga Book 9 keyboard dock detection Dave Carey
2026-06-10 15:53 ` [PATCH v8 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
2026-06-10 16:40   ` Hans de Goede
2026-06-10 15:53 ` [PATCH v8 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey
2026-06-10 16:40   ` Hans de Goede
2026-06-10 17:59   ` Armin Wolf
2026-06-12 13:25     ` Dave Carey
2026-06-16 14:35 ` [PATCH v9 0/2] platform/x86/lenovo: Yoga Book 9 keyboard dock detection Dave Carey
2026-06-16 14:35   ` [PATCH v9 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
2026-06-16 14:35   ` [PATCH v9 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.