From: Dave Carey <carvsdriver@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: ilpo.jarvinen@linux.intel.com, hansg@kernel.org
Subject: [PATCH v8 0/2] platform/x86/lenovo: Yoga Book 9 keyboard dock detection
Date: Wed, 10 Jun 2026 11:53:38 -0400 [thread overview]
Message-ID: <20260610155340.342949-1-carvsdriver@gmail.com> (raw)
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
next reply other threads:[~2026-06-10 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 15:53 Dave Carey [this message]
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
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=20260610155340.342949-1-carvsdriver@gmail.com \
--to=carvsdriver@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.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 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.