Re: [PATCH v4 2/4] platform: arm64: Add a driver for the EC found on ASUS Glymur machines
From: Konrad Dybcio
Date: Thu Oct 15 2026 - 11:18:11 EST
On 10/15/26 4:24 PM, Ilpo Järvinen wrote:
> On Thu, 15 Oct 2026, Konrad Dybcio wrote:
>
>> From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>>
>> Some Qualcomm Snapdragon X2 Elite (Extreme)-based ASUS laptops (at
>> least the Zenbook A14 and A16) expose a custom, somewhat
>> Qualcomm reference-derived EC interface. Introduce a driver to
>> communicate with said EC, allowing for fan speed reporting, keyboard
>> backlight setting and receiving of a number of miscellaneous sideband
>> events.
[...]
>> +/* RAM addresses are sent MSB first, while returned data is LSB first. */
>> +struct asus_qcom_ec_ram_request {
>> + __be16 addr;
>> + u8 count;
>> + u8 reserved[2];
>> +} __packed;
>> +
>> +struct asus_qcom_ec_ram_response {
>> + __le16 data;
>> + u8 unused[3];
>> +} __packed;
>
> Endianness stuff looks sane now but __packed also needs an include.
Some fun statistics:
$ rg compiler_attributes.h drivers -l | wc -l
30
$ rg __packed drivers -l | wc -l
1228
[...]
>> +static int asus_qcom_ec_read_ram(struct asus_ec *ec, u16 addr, u8 count, u16 *out)
>> +{
>> + struct asus_qcom_ec_ram_request req = {
>> + .addr = cpu_to_be16(addr),
>> + .count = count,
>> + .reserved = { 0 },
>
> 0 is the default init value so generally = {} should be enough but I think
> it's not necessary to add the reserved member at all because the entire
> struct should be initialized anyway by the surrounding construct.
>
> With these fixed,
>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Yeah I know. I still left it in deliberately so that in case anyone
wants to audit the format here and compare it to the DSDT it's more
obvious that this wasn't an oversight. Do you still prefer I resend
(or maybe you'd like to fix that up while applying, which I don't
mind either)?
Konrad