Re: [PATCH 2/2] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver
From: Oleg Keri
Date: Tue Sep 08 2026 - 07:36:26 EST
On Tue, Sep 08, 2026 at 09:28:05AM +0000, sashiko-bot@xxxxxxxxxx wrote:
> - [Low] Missing dependency on CONFIG_INPUT in Kconfig.
Correct, thanks. The driver calls devm_input_allocate_device() and
input_register_device() unconditionally, so EC_LENOVO_YOGA_SLIM7X_GEN11=y
with INPUT=m would fail to link. I will add "depends on INPUT" in v2, which
is also what EC_ACER_ASPIRE1, EC_LENOVO_THINKPAD_T14S and EC_HUAWEI_GAOKUN
declare.
> - [Medium] Hardware monitoring device registered directly from a platform
> driver outside of drivers/hwmon/.
I would prefer to keep this as it is, unless the hwmon maintainer disagrees.
The auxiliary device guidance in Documentation/hwmon/submitting-patches.rst
is aimed at chips whose hardware monitoring is a distinct sub-function
substantial enough to warrant its own driver. The embedded controller
drivers under drivers/platform/arm64/ register their hwmon device inline
instead, because the monitoring is a handful of registers reached over the
same I2C mailbox the rest of the driver already owns.
The closest precedent is huawei-gaokun-ec.c, in this same directory, which
does exactly this:
ec->hwmon_dev = devm_hwmon_device_register_with_info(dev, "gaokun_ec_hwmon",
ec, &gaokun_ec_hwmon_chip_info,
NULL);
with "depends on HWMON" in its Kconfig entry.
Splitting five thermistors, four cell voltages and one tachometer into an
auxiliary device would add an auxiliary bus, a second driver and a
shared-state accessor for readings that are one I2C transaction each. The
cell voltages in particular have to take the same lock as the rest of the
driver: they live in a banked mailbox shared with other EC activity, are
validated against a signature and retried, and are cached so that all four
channels come from one coherent sample.
Guenter, if you would rather see the auxiliary split, please say so and I
will rework it.
Thanks,
Oleg