From: Armin Wolf <W_Armin@gmx.de>
To: Nikita Krasnov <nikita.nikita.krasnov@gmail.com>,
linux-acpi@vger.kernel.org, linux-input@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux@weissschuh.net,
fengwk94@gmail.com
Subject: Re: Missing ACPI driver for a keyboard button in Xiaomi RedmiBook Pro 16
Date: Mon, 28 Jul 2025 00:24:02 +0200 [thread overview]
Message-ID: <b4707664-6177-45ff-a284-36e921f316e7@gmx.de> (raw)
In-Reply-To: <8f3d1015-3bef-4e7f-abea-c6665163af16@gmail.com>
Am 27.07.25 um 13:23 schrieb Nikita Krasnov:
> Hello again!
>
> Sorry for taking so long. Real life stuff gets in the way :(
>
> On Tue, Jul 22, 2025 at 07:09:37PM +0300 Armin Wolf wrote:
>> Take a look at https://docs.kernel.org/wmi/driver-development-guide.html.
> Thanks! Coupled with articles [1] and [2] this was a very good
> introduction to WMI and ACPI.
Please note that the LWN article regarding WMI drivers is quite outdated. Please follow the
WMI driver development guide from the kernel documentation instead.
>> Sure, but you have to develop a new WMI driver for your device because after looking at the
>> ACPI tables (SSDT20 in particular) i came to the conclusion that the xiaomi-wmi driver cannot
>> be used in this case.
> Why is that? Is it because xiaomi-wmi is using deprecated GUID-based WMI
> interface?
No, it is because your device is using a different WMI interface for delivering events. Device manufacturers
are not exactly known for using the same WMI interfaces for a long time :(.
> Btw, it's so weird for me that there are many laptop models, but only
> one *-wmi.c file per manufacturer (be it Xiaomi, ThinkPad, MSI or Asus).
> Is it because most of the time we write a driver for a specific piece of
> hardware that may be reused in different laptop models?
Usually a given WMI interface is used on a wide range of models so that the device manufacturers
do not have to develop a giant number of backends for their control center applications under Windows.
That is why many WMI driver work on a wide range of devices from a given manufacturer.
>> I suggest that you write a skeleton driver first that basically prints
>> the content of this buffer to the kernel log using print_hex_dump_bytes().
> About that... Would you be okay with me implementing this driver in
> Rust? I assume it's you, an ACPI WMI DRIVER maintainer, whose permission
> needs to be granted to green-light this?
Personally i have no problem with you writing a WMI driver in Rust, but currently we have
no suitable bindings for the WMI driver API. Additionally i am currently designing a new
WMI driver API that will make it easier to implement the necessary Rust bindings, so the
whole thing might take some time.
Would it be possible for you to implement the WMI driver in C?
Thanks,
Armin Wolf
> [1]: https://lwn.net/Articles/391230/
> [2]: https://lwn.net/Articles/367630/
>
> --
> Nikita Krasnov
next prev parent reply other threads:[~2025-07-27 22:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-19 23:39 Missing ACPI driver for a keyboard button in Xiaomi RedmiBook Pro 16 Nikita Krasnov
2025-07-20 10:58 ` Nikita Krasnov
2025-07-20 23:17 ` Armin Wolf
2025-07-20 23:23 ` Armin Wolf
2025-07-22 12:48 ` Nikita Krasnov
2025-07-22 16:09 ` Armin Wolf
2025-07-27 11:23 ` Nikita Krasnov
2025-07-27 22:24 ` Armin Wolf [this message]
2025-07-27 23:36 ` Nikita Krasnov
2025-07-28 21:22 ` 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=b4707664-6177-45ff-a284-36e921f316e7@gmx.de \
--to=w_armin@gmx.de \
--cc=fengwk94@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=nikita.nikita.krasnov@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox