]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: asus-wmi: Add support for multiple kbd led handlers
authorAntheas Kapenekakis <lkml@antheas.dev>
Thu, 22 Jan 2026 07:50:40 +0000 (08:50 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 28 Jan 2026 12:02:30 +0000 (14:02 +0200)
commitfac55d29581fcd4c3b66b9c2b9f7995c459c0064
treecbb717aa07b0ea08a0b577ee9fbbb2a90b62652f
parent4ac74ea68f6429512faf06a3365a2ba6b96d48d6
platform/x86: asus-wmi: Add support for multiple kbd led handlers

Some devices, such as the Z13 have multiple Aura devices connected
to them by USB. In addition, they might have a WMI interface for
RGB. In Windows, Armoury Crate exposes a unified brightness slider
for all of them, with 3 brightness levels.

Therefore, to be synergistic in Linux, and support existing tooling
such as UPower, allow adding listeners to the RGB device of the WMI
interface. If WMI does not exist, lazy initialize the interface.

Since hid-asus and asus-wmi can both interact with the led objects
including from an atomic context, protect the brightness access with a
spinlock and update the values from a workqueue. Use this workqueue to
also process WMI keyboard events, so they are handled asynchronously.

Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Reviewed-by: Denis Benato <benato.denis96@gmail.com>
Link: https://patch.msgid.link/20260122075044.5070-8-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/asus-wmi.c
include/linux/platform_data/x86/asus-wmi.h