All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Dave Carey <carvsdriver@gmail.com>
Cc: platform-driver-x86@vger.kernel.org, W_Armin@gmx.de,
	 johannes.goede@oss.qualcomm.com,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v12 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver
Date: Tue, 21 Jul 2026 19:27:54 +0300 (EEST)	[thread overview]
Message-ID: <bd2f2f4b-9cc8-b2db-799c-4616b7ce3513@linux.intel.com> (raw)
In-Reply-To: <20260713143132.381808-3-carvsdriver@gmail.com>

On Mon, 13 Jul 2026, Dave Carey wrote:

> The Lenovo Yoga Book 9 14IAH10 ships with a detachable Bluetooth keyboard
> that magnetically attaches to the bottom (secondary) screen in one of two
> positions.  The Embedded Controller tracks the attachment state in a 2-bit
> field called BKBD and signals changes via WMI event GUID
> 806BD2A2-177B-481D-BFB5-3BA0BB4A2285 (notify ID 0xEB on the WM10 ACPI
> device, _UID "GMZN").
> 
> The device contains embedded BMOF data (WQDD, 20705 bytes) documenting
> both WMI interfaces used by this driver:
> 
>    LENOVO_BTKBD_EVENT (event GUID): WmiDataId(1) uint32 Status.
>    The ACPI _WED(0xEB) method returns EC.BKBD directly as an integer,
>    so the notify callback receives BKBD without a separate query.
> 
>    LENOVO_FEATURE_STATUS_DATA (block GUID, WQAF method): returns an
>    8-byte buffer {uint32 IDs=0x00060000, uint32 Status=BKBD}.
>    Used for the initial state read on probe and after resume.
> 
> BKBD encoding:
>    0 = keyboard detached
>    1 = keyboard docked on top half of bottom screen
>    2 = keyboard docked on bottom half of bottom screen
>    3 = reserved (not observed in practice)
> 
> This driver registers two WMI drivers sharing a module-level
> BLOCKING_NOTIFIER_HEAD:
> 
>    - The event driver (LENOVO_BTKBD_EVENT) uses .notify_new() to receive
>      a pre-parsed wmi_buffer and fires the notifier chain with the BKBD
>      value extracted from the buffer.
> 
>    - The block driver (LENOVO_FEATURE_STATUS_DATA) owns the input_dev in
>      its per-device private struct.  At probe time it registers a
>      notifier_block on the chain and reads the initial BKBD state via
>      wmidev_query_block().  The WMI buffer is parsed as
>      struct lenovo_feature_status { __le32 id; __le32 status; }, and the
>      ID field is verified before the status is used.
> 
>    - SW_TABLET_MODE=1 is reported when the keyboard is detached;
>      SW_TABLET_MODE=0 when docked in either position (keyboard present).
> 
>    - The raw BKBD value is exposed via read-only sysfs attribute
>      "keyboard_position".
> 
>    - BKBD state is re-read via wmidev_query_block() on resume from
>      suspend or hibernation.
> 
> Tested on: Lenovo Yoga Book 9 14IAH10 (model 83KJ), kernel 7.0.
> 
> Acked-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> Reviewed-by: Armin Wolf <W_Armin@gmx.de>
> Signed-off-by: Dave Carey <carvsdriver@gmail.com>

Hi Dave,

Unfortunately this patch is somehow corrupted and I couldn't immediately 
figure out where so you need to fix the problem and send the series again. 

It may be worthwhile to send it yourself first and test you can apply it 
with git am yourself to make sure nothing in the way you send an email is 
causing the corruption. Once it works for you, it will likely work in my 
end as well.

--
 i.


  reply	other threads:[~2026-07-21 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 14:31 [PATCH v12 0/2] Lenovo Yoga Book 9 keyboard dock detection Dave Carey
2026-07-13 14:31 ` [PATCH v12 1/2] platform/x86/lenovo: lenovo-ymc: Suppress probe on Yoga Book 9 14IAH10 Dave Carey
2026-07-13 14:31 ` [PATCH v12 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey
2026-07-21 16:27   ` Ilpo Järvinen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-23 12:59 [PATCH v11 0/2] platform/x86/lenovo: Yoga Book 9 keyboard dock detection Dave Carey
2026-07-08 15:09 ` [PATCH v12 0/2] Lenovo " Dave Carey
2026-07-08 15:09   ` [PATCH v12 2/2] platform/x86/lenovo: Add Yoga Book 9 keyboard dock detection driver Dave Carey

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=bd2f2f4b-9cc8-b2db-799c-4616b7ce3513@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=W_Armin@gmx.de \
    --cc=carvsdriver@gmail.com \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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.