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; 25+ 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] 25+ messages in thread
* [PATCH v12 0/2] Lenovo Yoga Book 9 keyboard dock detection
@ 2026-07-13 14:31 Dave Carey
  0 siblings, 0 replies; 25+ messages in thread
From: Dave Carey @ 2026-07-13 14:31 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: ilpo.jarvinen, W_Armin, johannes.goede, linux-kernel, Dave Carey

Changes in v12 (addressing Ilpo Järvinen's v11 review of patch 2/2):

  - Add #include <linux/sysfs.h> (for sysfs_emit)
  - Add #include <linux/types.h> (for __le32 and __packed)

Changes in v11 (addressing Armin Wolf's v10 review of patch 2/2):

  - ABI doc: correct Date to "June 2027" and KernelVersion to "7.3";
    these fields should reflect when the ABI lands in the kernel, not
    the submission date.

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

Changes in v10 (addressing Armin Wolf's v9 review of patch 2/2):

  - Update ABI doc: Date: June 2026, KernelVersion: 6.16
  - Add #include <linux/compiler_attributes.h> and <linux/types.h>
  - yb9_kbdock_query(): change return to pointer-out u32 *bkbd to avoid
    a 0xFFFFFFFF status value being misread as -EPERM
  - struct yb9_kbdock_data: add spinlock_t lock
  - yb9_kbdock_report(): hold lock across input_report_switch + input_sync
  - yb9_kbdock_sync(): return int, propagate query error to callers
  - yb9_kbdock_resume(), yb9_kbdock_block_probe(): propagate sync error
  - struct wmi_buffer out: remove zero-initializer (not needed)
  - yb9_kbdock_notify_new(): drop manual length check; use
    .min_event_size = sizeof(__le32) in struct wmi_driver instead

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

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

 Documentation/ABI/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                  | 322 ++++++++++++
 drivers/platform/x86/lenovo/ymc.c                         |  19 ++
 6 files changed, 382 insertions(+)

2.47.0

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

end of thread, other threads:[~2026-07-13 14:31 UTC | newest]

Thread overview: 25+ 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
2026-06-19 19:49     ` Armin Wolf
2026-06-21 13:57   ` [PATCH v10 0/2] Lenovo Yoga Book 9 keyboard dock detection Dave Carey
2026-06-21 13:57     ` [PATCH v10 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
2026-06-21 13:57     ` [PATCH v10 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey
2026-06-22 21:17       ` Armin Wolf
2026-06-23 12:59         ` [PATCH v11 0/2] platform/x86/lenovo: Yoga Book 9 keyboard dock detection Dave Carey
2026-06-23 12:59           ` [PATCH v11 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
2026-06-23 12:59           ` [PATCH v11 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey
2026-07-07 13:40             ` Ilpo Järvinen
2026-07-08 15:09           ` [PATCH v12 0/2] Lenovo Yoga Book 9 keyboard dock detection Dave Carey
2026-07-08 15:09             ` [PATCH v12 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
2026-07-08 15:09             ` [PATCH v12 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey
2026-07-09 10:33             ` [PATCH v12 0/2] Lenovo Yoga Book 9 keyboard dock detection Ilpo Järvinen
     [not found]               ` <CALPvRORKneYRyQXLQtqBTWWqRYkV5uP8e8cqpSQXYdLTb=BN9w@mail.gmail.com>
2026-07-09 13:34                 ` Ilpo Järvinen
  -- strict thread matches above, loose matches on Subject: below --
2026-07-13 14:31 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.