Re: [PATCH 1/1] Add WMI driver for Redmibook keyboard.

From: Armin Wolf
Date: Wed Jul 30 2025 - 12:35:36 EST


Am 29.07.25 um 10:37 schrieb Gladyshev Ilya:

On 7/29/25 00:47, Armin Wolf wrote:
Am 28.07.25 um 00:34 schrieb Gladyshev Ilya:

This driver implements support for various Fn keys (like Cut) and Xiaomi
specific AI button.

Interesting, i was just talking with another person about implementing a WMI event
driver for the exact same WMI event device. I CCed the person involved in the discussion
so that he can test this driver on his device as well.
All in all the driver looks promising, but there are still things that need to be improved
before we can include this driver in the mainline kernel. For details see below.
Thanks for your feedback, will fix in v2. However, I have small question: do I still need a mutex for linearizability if I implement driver via sparse-keymap? I've copied mutex from xiaomi-wmi, but as I looked up not all WMI keyboard drivers use it (fujitsu-laptop, acer-wmi).

Yes, the mutex is still necessary unless the event handler itself is already protected by some sort of locking. Many older WMI driver are not using a mutex for legacy reasons, but new drivers should.

Thanks,
Armin Wolf

--
Gladyshev Ilya