From: Denis Benato <denis.benato@linux.dev>
To: "bartu alev" <bartualev@gmail.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Corentin Chary <corentin.chary@gmail.com>,
"Luke D. Jones" <luke@ljones.dev>,
Hans de Goede <hansg@kernel.org>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
linux-api@vger.kernel.org,
Denis Benato <benato.denis96@gmail.com>
Subject: Re: [PATCH v4 1/2] platform/x86: asus-wmi: add TUF keyboard RGB readback support
Date: Tue, 17 Nov 2026 03:24:27 +0100 [thread overview]
Message-ID: <efce8f30-33f9-451a-b2a8-89ca0a39917c@linux.dev> (raw)
In-Reply-To: <068991e6-ca31-41b5-b9ed-f0902eae8368@gmail.com>
On 11/17/26 01:07, bartu alev wrote:
> On 11/17/26 2:53 AM, Denis Benato wrote:
>
>> Yes, it's absolutely reasonable. If the return either doesn't have the
>> presence bit set or is 0xFFF..... it is to be counted as "not implemented".
>>
>> And also yes, we should respect ABIs whenever possible...
>>
>> However... now that I think about it asus_wmi_evaluate_method_buf() can
>> be used on setters and those don't have the presence bit, do we have that
>> covered?
> yes that wont break setters:
>
> 1. asus_wmi_evaluate_method_buf() is strictly a buffer-getter helper (its
> comment states it returns an error whenever the ACPI output is not a
> buffer). Integer-returning DEVS setters use
> asus_wmi_evaluate_method*() /
> asus_wmi_set_devstate() instead; even today, passing an integer `1`
> from DEVS through _buf() returns 1 as an error.
Yeah I checked: only one caller. Make it check for known -ENODEV:
0xff...fe.
The only reference (as far as I can tell) to ~0 being "absent" is this:
absent=(l==0xffffffff);
inside asus_rfkill_hotplug, maybe you can exclude checking for that,
albeit it's not going to harm.
Perhaps add proper kernel-doc to that function where possible
errors are documented as well as input parameters.
> 2. We wouldn't check ASUS_WMI_DSTS_PRESENCE_BIT in _buf() at all. A
> buffer-returning call (getter or setter) still hits `case
> ACPI_TYPE_BUFFER` and returns 0 unchanged. Only `case ACPI_TYPE_INTEGER`
> changes to decode via `u32 retval`:
> - 0xfffffffe or (u32)~0 (0xffffffff) -> -ENODEV
> - 0 or any other integer -> -ENODATA (matching `default:`)
Sorry I am a bit spoiled by the past work of Marco where he reorganized
the whole thing.
We should really revive that, but it's a long work that touches quite a bit of
very old code...
> Then only kbd_rgb_read_status() maps -ENODATA -> -ENODEV so FX505DT /
> 0-returning firmware matches the ABI without altering setter or legacy
> buffer semantics.
Good. Very good.
next prev parent reply other threads:[~2026-11-17 2:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 23:48 [PATCH v4 0/2] platform/x86: asus-wmi: TUF keyboard RGB readback Bartu Alev
2026-10-28 23:48 ` [PATCH v4 1/2] platform/x86: asus-wmi: add TUF keyboard RGB readback support Bartu Alev
2026-11-09 18:02 ` Ilpo Järvinen
2026-11-10 2:50 ` Denis Benato
2026-11-10 11:43 ` Ilpo Järvinen
2026-11-16 22:00 ` bartu alev
2026-11-16 23:53 ` Denis Benato
2026-11-17 0:07 ` bartu alev
2026-11-17 2:24 ` Denis Benato [this message]
2026-10-28 23:48 ` [PATCH v4 2/2] Documentation/ABI: asus-wmi: document TUF keyboard RGB attributes Bartu Alev
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=efce8f30-33f9-451a-b2a8-89ca0a39917c@linux.dev \
--to=denis.benato@linux.dev \
--cc=bartualev@gmail.com \
--cc=benato.denis96@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.