From: sashiko-bot@kernel.org
To: "Birk Skyum" <birk.skyum@pm.me>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] platform: arm64: qcom-hamoa-ec: monitor Slim 7x legacy sensors
Date: Tue, 08 Sep 2026 02:03:39 +0000 [thread overview]
Message-ID: <20260908020339.F16FC1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908015650.84401-2-birk.skyum@pm.me>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Hardware monitoring functionality is registered directly from a platform driver outside of the drivers/hwmon/ directory.
--
commit 763b40f1f55a5efec49b9919dd06a1242c3e47c2
Author: Birk Skyum <birk.skyum@pm.me>
platform: arm64: qcom-hamoa-ec: monitor Slim 7x legacy sensors
This commit adds read-only fan speed and thermistor monitoring for the
Lenovo Yoga Slim 7x embedded controller using a legacy interface.
Link: https://github.com/aarch64-laptops/build/blob/2e58842f5fa2f87771c2df017ae4d8c65225ef10/misc/lenovo-yoga-slim-7x/acpi/dsdt.dsl
Link: https://lkml.iu.edu/hypermail/linux/kernel/2607.3/08806.html
> diff --git a/drivers/platform/arm64/qcom-hamoa-ec.c b/drivers/platform/arm64/qcom-hamoa-ec.c
> index 4d2ad042a7f84..3a4ca8a0de5c8 100644
> --- a/drivers/platform/arm64/qcom-hamoa-ec.c
> +++ b/drivers/platform/arm64/qcom-hamoa-ec.c
[ ... ]
> +static int qcom_ec_hwmon_probe(struct qcom_ec *ec)
> +{
> + struct device *dev = &ec->client->dev;
> + struct device *hwmon;
> + long rpm;
> + int ret;
> +
> + if (!i2c_check_functionality(ec->client->adapter,
> + I2C_FUNC_I2C | I2C_FUNC_SMBUS_READ_BYTE_DATA))
> + return -EOPNOTSUPP;
> +
> + ret = qcom_ec_read_fan_rpm(ec, &rpm);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to read fan RPM\n");
> +
> + hwmon = devm_hwmon_device_register_with_info(dev, "qcom_ec", ec,
> + &qcom_ec_hwmon_chip_info, NULL);
[Severity: Low]
Does this violate the hardware monitoring subsystem layering rules by
registering a hwmon device directly from drivers/platform/arm64/ within
qcom_ec_hwmon_probe?
Since the main functionality of this EC chip is not hardware monitoring,
should the hwmon functionality be implemented as an auxiliary device driver
residing in drivers/hwmon/ to avoid bypassing maintainer review and
increasing driver complexity?
> + return PTR_ERR_OR_ZERO(hwmon);
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908015650.84401-1-birk.skyum@pm.me?part=1
next prev parent reply other threads:[~2026-09-08 2:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 1:57 [RFC PATCH 0/2] Monitor Yoga Slim 7x EC sensors without taking over cooling Birk Skyum
2026-09-08 1:57 ` [RFC PATCH 1/2] platform: arm64: qcom-hamoa-ec: monitor Slim 7x legacy sensors Birk Skyum
2026-09-08 2:03 ` sashiko-bot [this message]
2026-09-08 5:25 ` Guenter Roeck
2026-09-08 1:57 ` [RFC PATCH 2/2] platform: arm64: qcom-hamoa-ec: test sensor and variant handling Birk Skyum
2026-09-08 2:07 ` sashiko-bot
2026-09-08 2:18 ` Birk Skyum
2026-09-08 5:26 ` Guenter Roeck
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=20260908020339.F16FC1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=birk.skyum@pm.me \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.