[PATCH v5 0/3] platform/asus: asus-wmi: TUF keyboard RGB readback
From: Bartu Alev
Date: Tue Nov 17 2026 - 05:31:24 EST
Patches 1-3 of v3 are in review-ilpo-next already; this reroll carries
the remaining two patches plus a new prep patch hardening
asus_wmi_evaluate_method_buf(), as discussed in the v4 thread, and is
rebased on the current review-ilpo-next tip.
DSTS device 0x0010005B evaluates the DSDT method EC0.KBLS(), which
snapshots the EC's host-visible keyboard state into a 16-byte buffer:
lighting mode, red, green and blue levels, animation speed, and the
four power flags. kbd_rgb_mode and kbd_rgb_state become readable and
report the write format with n/a in the command position, because the
command word belongs to the write verb and has no state equivalent.
Changes in v5:
- new prep patch: asus_wmi_evaluate_method_buf() decodes integer
replies through a u32, mapping ASUS_WMI_UNSUPPORTED_METHOD
(0xfffffffe) and 0xffffffff to -ENODEV and any other integer to
-ENODATA so bit-31 status words cannot alias negative errnos, adds a
missing NULL check on the ACPI output object, and adds kernel-doc
for its parameters and error returns (suggested by Ilpo Järvinen's
sashiko question and Denis Benato)
- kbd_rgb_read_status() uses asus->dsts_id (matching the existing buffer
helper caller and probe) and translates -ENODATA to -ENODEV so
firmware that answers 0 for 0x0010005B while reporting 0x00100056/57
present (e.g. FX505DT) fails with the errno the ABI documents
- Documentation/ABI: carry Daniel Pereira's Reviewed-by, fix ReST
literal block markers, and bump Date/KernelVersion to Nov 2026 / 7.5
- rebased on the current review-ilpo-next tip, where the driver moved
under drivers/platform/asus/
- Link to v4: https://patch.msgid.link/20261029-asus-tuf-rgb-v4-v4-0-0d3b877d2c30@xxxxxxxxx
Changes in v4:
- report n/a in the command position on read instead of a synthetic 1,
as discussed in the v2 thread: the command word belongs to the write
verb, so there is no state to report there
- ABI documentation: describe the n/a command word, state the mode
clamping exactly (mode 9 and modes 12 and above are sent as 10), and
note that reads fail with -ENODEV on hardware without readback
support
Provenance: the KBLS buffer layout and the speed-code semantics were
recovered by static analysis of the EC firmware (ITE IT5570VG), with
the help of an LLM-driven toolchain. Tested on a TUF Gaming A15
(FA507NV): the v2 readback on kernel 7.2.6, and the S5 behaviour of
the shutdown flag by A/B testing both values.
v4: https://lore.kernel.org/all/20261029-asus-tuf-rgb-v4-v4-0-0d3b877d2c30@xxxxxxxxx/
v3: https://lore.kernel.org/all/20261010101601.888709-1-bartualev@xxxxxxxxx/
v2: https://lore.kernel.org/all/20260926005625.171560-1-bartualev@xxxxxxxxx/
v1: https://lore.kernel.org/all/20260925200744.129714-1-bartualev@xxxxxxxxx/
Signed-off-by: Bartu Alev <bartualev@xxxxxxxxx>
---
Bartu Alev (3):
platform/asus: asus-wmi: decode integer replies in buffer helper
platform/asus: asus-wmi: add TUF keyboard RGB readback support
Documentation/ABI: asus-wmi: document TUF keyboard RGB attributes
Documentation/ABI/testing/sysfs-platform-asus-wmi | 46 ++++++++
drivers/platform/asus/asus-wmi.c | 134 ++++++++++++++++++++--
include/linux/platform_data/x86/asus-wmi.h | 3 +
3 files changed, 172 insertions(+), 11 deletions(-)
---
base-commit: 9c82959c37bf69c2ace8a0f975cf2129ec1fd982
change-id: 20261029-asus-tuf-rgb-v4-06ad93a6060b
Best regards,
--
Bartu Alev <bartualev@xxxxxxxxx>