From: Hans de Goede <hansg@kernel.org>
To: David Cemin <dcemin@nvidia.com>,
ilpo.jarvinen@linux.intel.com, W_Armin@gmx.de
Cc: mpearson-lenovo@squebb.ca, derekjohn.clark@gmail.com,
xy-jackie@139.com, ikepanhc@gmail.com,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, ldemarchi@nvidia.com
Subject: Re: [RFC PATCH 0/3] platform: lenovo: architecture independent home for the Lenovo WMI drivers
Date: Sun, 15 Nov 2026 21:12:43 +0100 [thread overview]
Message-ID: <206de2d5-ef5a-4490-b6b7-c0e98893ec5b@kernel.org> (raw)
In-Reply-To: <8aa1533d-8f9c-4c69-aa34-266ea3beb54e@kernel.org>
p.s.
On 15-Nov-26 21:10, Hans de Goede wrote:
> On 15-Nov-26 16:33, Hans de Goede wrote:
>
> <snip>
>
>>> b. Should the Fn key event handling stay a separate small driver, or
>>> be factored out of ideapad-laptop so x86 and arm64 share one path?
>>> ideapad-laptop handles the event only when its VPC platform driver
>>> is bound, and the arm64 machines expose none of the VPC interface
>>> it is built on (no _CFG, VPCR/VPCW, DYTC or HALS/SALS), so making
>>> it the single driver means gating most of its probe. Two smaller
>>> options: lift ideapad-laptop's own Fn key wmi_driver and keymap
>>> into this file and let ideapad-laptop register for the events it
>>> still wants (Fn lock LED, DYTC cycle), or the hid-asus/asus-wmi
>>> shape where a companion WMI module exports the event to a
>>> subsystem driver. The keymap in patch 2 duplicates entries of
>>> ideapad-laptop's table on purpose until that is decided.
>>
>> IIRC the ideapad-laptop driver is a bit of a mess atm, so factoring
>> a common handling for the the Fn key events out of this and sharing
>> that sounds like a nice cleanup.
>>
>> I see that patch 2/3 uses the new wmi-driver/-bus infra which is
>> nice and clean.
>>
>> So maybe just keep your existing stand-alone driver for both x86_64 +
>> arm64 and drop the WMI event handling from ideapad-laptop.
>>
>> I guess this may hit some problems where WMI event handlig is used
>> in ideapad-laptops integrating with some VPC functionality.
>>
>> For that purpose I think that the new
>> drivers/platform/lenovo/wmi-hotkeys.c could maybe expose some
>> notifier and call that for events it does not handle itself
>> and then ideapad-laptop can depend on some function to register
>> a listener on that notifier (1) and register a notifier handler
>> staying out of WMI handling itself.
>>
>> No idea if this is feasible / how clean the end result will be,
>> just brainstorming and saying yes to doing some refactoring of
>> the somewhat messy ideapad-laptop code.
>>
>> Note that https://github.com/systemd/systemd/blob/main/hwdb.d/60-keyboard.hwdb
>> has some mappings for "Ideapad extra buttons" input devices
>> (+ DMI match), so if any of the buttons remapped there end up
>> under the new WMI driver then that should probably give its
>> input device the same name, to make sure those mappings still
>> apply.
>
> Also see this just posted ideapad-laptop series which does
> something similar for handling YMC events:
>
> https://lore.kernel.org/platform-driver-x86/20261116-ymc-82yl-v1-0-fac1a2b01a84@rong.moe/
I see that this routes everything through a new lenovo wmi-events
helper which uses a single notifier to which interested parties
like ideapad-laptop can subscribe. I think this models could
be extended to also handle the hotkeys, assuming all the base
bits are moved into the new drivers/platform/lenovo/ dir.
Regards,
Hans
next prev parent reply other threads:[~2026-11-15 20:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 22:27 [RFC PATCH 0/3] platform: lenovo: architecture independent home for the Lenovo WMI drivers David Cemin
2026-11-13 22:27 ` [RFC PATCH 1/3] platform: lenovo: move the architecture independent WMI drivers out of x86 David Cemin
2026-11-15 21:50 ` Mark Pearson
2026-11-16 4:42 ` David Cemin
2026-11-16 16:59 ` Mark Pearson
2026-11-17 2:27 ` Jackie Dong
2026-11-13 22:27 ` [RFC PATCH 2/3] platform: lenovo: add WMI hotkeys driver David Cemin
2026-11-15 16:12 ` Armin Wolf
2026-11-16 4:42 ` David Cemin
2026-11-17 1:39 ` Armin Wolf
2026-11-16 10:55 ` Marco Giunta
2026-11-17 3:27 ` Jackie Dong
2026-11-13 22:27 ` [RFC PATCH 3/3] platform/x86: ideapad-laptop: do not bind the WMI event devices without the VPC David Cemin
2026-11-15 15:33 ` [RFC PATCH 0/3] platform: lenovo: architecture independent home for the Lenovo WMI drivers Hans de Goede
2026-11-15 16:02 ` Armin Wolf
2026-11-15 18:02 ` Hans de Goede
2026-11-15 20:10 ` Hans de Goede
2026-11-15 20:12 ` Hans de Goede [this message]
2026-11-15 21:48 ` Mark Pearson
2026-11-16 4:42 ` David Cemin
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=206de2d5-ef5a-4490-b6b7-c0e98893ec5b@kernel.org \
--to=hansg@kernel.org \
--cc=W_Armin@gmx.de \
--cc=dcemin@nvidia.com \
--cc=derekjohn.clark@gmail.com \
--cc=ikepanhc@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=ldemarchi@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
--cc=xy-jackie@139.com \
/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.