From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Hans de Goede <hansg@kernel.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Guenter Roeck <linux@roeck-us.net>,
Bjorn Andersson <andersson@kernel.org>,
Abel Vesa <abelvesa@kernel.org>,
devicetree@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org,
linux-hwmon@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4 2/4] platform: arm64: Add a driver for the EC found on ASUS Glymur machines
Date: Fri, 16 Oct 2026 13:50:21 +0300 (EEST) [thread overview]
Message-ID: <f97000c4-496d-0ce1-318a-1df5c0de804b@linux.intel.com> (raw)
In-Reply-To: <e4cec04d-2c66-4900-940c-d7d3d245cc64@oss.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 2869 bytes --]
On Thu, 15 Oct 2026, Konrad Dybcio wrote:
> On 10/15/26 4:24 PM, Ilpo Järvinen wrote:
> > On Thu, 15 Oct 2026, Konrad Dybcio wrote:
> >
> >> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >>
> >> 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
You didn't consider compiler.h -> compiler_types.h ->
compiler_attributes.h that seems a guaranteed include path to me. The
numbers would be slightly better with that.
> $ rg __packed drivers -l | wc -l
> 1228
>
> [...]
So lets not add another mine to what is already a scary minefield. :-)
The indirect include paths are a minefield if somebody ever wants to
refactor a header. I know some maintainers may be more lax on this but
here we try to follow include-what-you-use principle to extent that is
reasonable (when the include path is guaranteed such as
platform_device.h -> device.h or linux/x.h -> asm.h you can only include
the former ones).
> >> +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@linux.intel.com>
>
> 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)?
We can keep the member there but I'll change it to {}.
I can try to remember to fix these while applying (I'm good in
forgetting though :-)). But I at least try to check all the comments made
to the last version.
--
i.
next prev parent reply other threads:[~2026-10-16 10:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 8:55 [PATCH v4 0/4] Asus Zenbook A16/A14 (UX3607OA/UX3407NA) EC driver Konrad Dybcio
2026-10-15 8:55 ` [PATCH v4 1/4] dt-bindings: embedded-controller: Add ASUS Zenbook A16 EC Konrad Dybcio
2026-10-15 8:58 ` Konrad Dybcio
2026-10-15 9:03 ` sashiko-bot
2026-10-15 8:55 ` [PATCH v4 2/4] platform: arm64: Add a driver for the EC found on ASUS Glymur machines Konrad Dybcio
2026-10-15 9:16 ` sashiko-bot
2026-10-15 14:24 ` Ilpo Järvinen
2026-10-15 14:47 ` Konrad Dybcio
2026-10-16 10:50 ` Ilpo Järvinen [this message]
2026-10-20 14:00 ` Ilpo Järvinen
2026-10-20 14:01 ` Konrad Dybcio
2026-11-04 8:26 ` Kconfig dependency loop LEDS_CLASS -> EC_ASUS_GLYMUR -> THERMAL -> POWER_SUPPLY -> HID_NVIDIA_SHIELD -> LEDS_CLASS (was Re: [PATCH v4 2/4] platform: arm64: Add a driver for the EC found on ASUS Glymur machines ) Mikko Rapeli
2026-11-04 8:37 ` Konrad Dybcio
2026-11-04 8:50 ` Mikko Rapeli
2026-10-15 8:55 ` [PATCH v4 3/4] arm64: dts: qcom: glymur-zenbook-a16: Add Embedded Controller Konrad Dybcio
2026-10-15 9:01 ` sashiko-bot
2026-10-30 4:26 ` Burke Cates
2026-10-15 8:55 ` [PATCH v4 4/4] arm64: dts: qcom: glymur-zenbook-a14: " Konrad Dybcio
2026-10-15 8:58 ` sashiko-bot
2026-10-19 11:40 ` Abel Vesa
2026-10-20 22:08 ` [PATCH v4 0/4] Asus Zenbook A16/A14 (UX3607OA/UX3407NA) EC driver Loic Minier
2026-11-10 0:18 ` (subset) " Bjorn Andersson
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=f97000c4-496d-0ce1-318a-1df5c0de804b@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hansg@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@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.