* [PATCH v3 2/5] platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming
[not found] <20261010101601.888709-1-bartualev@gmail.com>
@ 2026-10-10 10:15 ` Bartu Alev
0 siblings, 0 replies; only message in thread
From: Bartu Alev @ 2026-10-10 10:15 UTC (permalink / raw)
To: platform-driver-x86
Cc: ilpo.jarvinen, hansg, luke, denis.benato, benato.denis96,
corentin.chary, linux-api, linux-kernel, Bartu Alev, stable
The fourth state flag of kbd_rgb_state_index is named "keyboard" and has
long been treated as having no effect. In hardware the flag, BIT(7) of
the payload sent to the TUF RGB state device, gates whether the keyboard
backlight stays lit while the machine powers off: with the bit set the
keyboard lights up white during the ACPI S5 sequence, with the bit clear
the machine powers off dark. Verified by A/B testing both values on a
TUF Gaming A15 (FA507NV).
Rename the fourth field and its index entry from "keyboard" to
"shutdown". The write format is unchanged, the value is still
positional, and the diff is two variable names and one string, so it
backports cleanly.
Fixes: 61f64515299e ("platform/x86: asus-wmi: Implement TUF laptop keyboard power states")
Cc: stable@vger.kernel.org
Signed-off-by: Bartu Alev <bartualev@gmail.com>
---
drivers/platform/x86/asus-wmi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 5adf7a289f82..5cc71bfac841 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1119,10 +1119,10 @@ static ssize_t kbd_rgb_state_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
- u32 flags, cmd, boot, awake, sleep, keyboard;
+ u32 flags, cmd, boot, awake, sleep, shutdown;
int err;
- if (sscanf(buf, "%d %d %d %d %d", &cmd, &boot, &awake, &sleep, &keyboard) != 5)
+ if (sscanf(buf, "%d %d %d %d %d", &cmd, &boot, &awake, &sleep, &shutdown) != 5)
return -EINVAL;
if (cmd)
@@ -1135,7 +1135,7 @@ static ssize_t kbd_rgb_state_store(struct device *dev,
flags |= BIT(3);
if (sleep)
flags |= BIT(5);
- if (keyboard)
+ if (shutdown)
flags |= BIT(7);
/* 0xbd is the required default arg0 for the method. Nothing happens otherwise */
@@ -1149,7 +1149,7 @@ static ssize_t kbd_rgb_state_store(struct device *dev,
static DEVICE_ATTR_WO(kbd_rgb_state);
static DEVICE_STRING_ATTR_RO(kbd_rgb_state_index, 0444,
- "cmd boot awake sleep keyboard");
+ "cmd boot awake sleep shutdown");
static struct attribute *kbd_rgb_state_attrs[] = {
&dev_attr_kbd_rgb_state.attr,
--
2.56.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-10 10:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261010101601.888709-1-bartualev@gmail.com>
2026-10-10 10:15 ` [PATCH v3 2/5] platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming Bartu Alev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox