mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Bartu Alev <bartualev@gmail.com>
Cc: platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	 Hans de Goede <hansg@kernel.org>,
	"Luke D . Jones" <luke@ljones.dev>,
	 Denis Benato <benato.denis96@gmail.com>,
	stable@vger.kernel.org,  Denis Benato <denis.benato@linux.dev>
Subject: Re: [PATCH v2 1/2] platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming
Date: Thu, 8 Oct 2026 15:22:29 +0300 (EEST)	[thread overview]
Message-ID: <3d7a74f7-a092-3ffe-ca6a-6daaba3accfd@linux.intel.com> (raw)
In-Reply-To: <20260926005625.171560-2-bartualev@gmail.com>

On Sat, 26 Sep 2026, Bartu Alev wrote:

> The fourth state flag of kbd_rgb_state_index is currently named
> "keyboard" and was historically assumed to have no effect. In hardware,
> this bit (BIT(7) in the WMI DEVS payload) gates whether the keyboard
> backlight remains illuminated during the ACPI S5 power-off sequence.
> 
> Hardware A/B testing on ASUS TUF Gaming A15 (FA507NV) confirms that
> setting this bit causes the keyboard to light up white upon power-off,
> while clearing it ensures a dark, clean shutdown.
> 
> Relabel this field from "keyboard" to "shutdown" to accurately describe
> its hardware function and align it with userspace tooling (asusctl,
> g-helper).
> 
> Fixes: 61f64515299e ("platform/x86: asus-wmi: Implement TUF laptop keyboard power states")
> Cc: stable@vger.kernel.org
> Suggested-by: Denis Benato <denis.benato@linux.dev>
> 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 a65090429ca7..db6ee1974838 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,
> 

Hi,

It seems we're missing Documentation for this interface... It would be 
nice to add that as well (in a separate patch).

-- 
 i.


  reply	other threads:[~2026-10-08 12:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 20:07 [PATCH v1] platform/x86: asus-wmi: add TUF keyboard RGB readback support Bartu Alev
2026-09-25 20:25 ` Denis Benato
2026-09-26  0:56 ` [PATCH v2 0/2] platform/x86: asus-wmi: Fix TUF keyboard shutdown naming and add RGB readback Bartu Alev
2026-09-26  0:56   ` [PATCH v2 1/2] platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming Bartu Alev
2026-10-08 12:22     ` Ilpo Järvinen [this message]
2026-09-26  0:56   ` [PATCH v2 2/2] platform/x86: asus-wmi: add TUF keyboard RGB readback support Bartu Alev
2026-09-26  1:41     ` Denis Benato
2026-10-08 12:48       ` Ilpo Järvinen
2026-10-08 21:52         ` Denis Benato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d7a74f7-a092-3ffe-ca6a-6daaba3accfd@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=bartualev@gmail.com \
    --cc=benato.denis96@gmail.com \
    --cc=denis.benato@linux.dev \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®