platform/x86: acer-wmi: Add 4-zone RGB keyboard support for Nitro AN515-58
Subsystems (2)
RFC PATCH 1/1 platform/x86: acer-wmi: Add 4-zone RGB keyboard support for Nitro AN515-58
Add support for the 4-zone RGB keyboard backlights found on Acer Nitro AN515-58 laptops.
The hardware operates via a dual-control mechanism: global hardware brightness is managed by the EC via RAM offset 0x31 with a range of 0 to 4 (where 0x04 is maximum intensity), while per-zone RGB color control is handled via WMI Method 6.
Exposing max_brightness = 4 to match the EC hardware level causes the led-class-multicolor subsystem to scale color components down, restricting the palette to 5x5x5 (125) total color combinations. Keeping max_brightness at 255 allows fine-grained 8-bit per-channel control from userspace, though it creates a dual-control scenario where hardware EC brightness and userspace multicolor brightness operate concurrently (e.g. EC brightness at 4 while userspace intensity is 0).
This implementation builds upon initial findings and reverse-engineering efforts by Dirga Yuza and open-source community driver implementations.
--- drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/acer-wmi.c | 357 +++++++++++++++++++++++++------- 2 files changed, 288 insertions(+), 70 deletions(-)
drivers/platform/x86/Kconfig +1 -0
@@ -168,6 +168,7 @@ config ACER_WMI select INPUT_SPARSEKMAP select LEDS_CLASS select NEW_LEDS + select LEDS_CLASS_MULTICOLOR select ACPI_PLATFORM_PROFILE help This is a driver for newer Acer (and Wistron) laptops. It adds
drivers/platform/x86/acer-wmi.c +287 -70
501 lines not on this page · raw message
Signature · 1 line
2.56.0