[PATCH v2 0/2] platform/x86: asus-wmi: Fix TUF keyboard shutdown naming and add RGB readback

From: Bartu Alev

Date: Fri Sep 25 2026 - 20:58:29 EST


This series fixes the historical misnomer of the TUF keyboard
shutdown power-state flag and adds sysfs readback support for the
TUF RGB mode and power states.

Patch 1 relabels the fourth state field of kbd_rgb_state_index from
"keyboard" to "shutdown": BIT(7) gates the keyboard backlight during
the ACPI S5 power-off sequence (A/B verified on FA507NV: bit set =
keyboard lights up white at power-off, clear = dark shutdown).

Patch 2 adds readback support via DSTS 0x0010005B, which evaluates
the DSDT method EC0.KBLS() and returns the live EC RAM state as a
16-byte buffer (mode, R/G/B, speed, power flags). Both kbd_rgb_mode
and kbd_rgb_state become readable.

Re: the cmd field question raised during review of v1 - the KBLS
buffer carries no command byte. "Immediate (0xb3) vs save (0xb4)" is
a property of the write verb, consumed by the SMM handler; neither
the EC firmware nor the ERM2 mirror retains it, and both verbs result
in the same applied state (verified by writing with cmd=0 and cmd=1
and reading back identical semantics). The leading '1' in the output
is therefore synthetic, chosen as the canonical input form so that
readback round-trips with what userspace writes.

Changes in v2:
- Split into a 2-patch series:
* patch 1: isolated naming fix with a Fixes: tag for -stable
* patch 2: the readback feature
- Renamed the new DEVID to ASUS_WMI_DEVID_TUF_RGB_READBACK to avoid
confusion with ASUS_WMI_DEVID_TUF_RGB_STATE.
- Documented the synthetic cmd field in the patch 2 commit message
and here.


Bartu Alev (2):
platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming
platform/x86: asus-wmi: add TUF keyboard RGB readback support

drivers/platform/x86/asus-wmi.c | 87 ++++++++++++++++++++--
include/linux/platform_data/x86/asus-wmi.h | 3 +
2 files changed, 84 insertions(+), 6 deletions(-)

--
2.55.0