All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Oleg Keri" <okerixx@gmail.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v5 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver
Date: Sat, 03 Oct 2026 20:29:24 +0000	[thread overview]
Message-ID: <20261003202925.1DECC1F0089B@smtp.kernel.org> (raw)
In-Reply-To: <20261003202143.4697-3-okerixx@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] hwmon: hardware monitoring registration outside drivers/hwmon/
--

commit 1e4db7708b954def668e65b4325f61905437ade8
Author: Oleg Keri <okerixx@gmail.com>

platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver

This commit introduces a new embedded controller driver for the Lenovo Yoga 
Slim 7x Gen 11. It exposes board thermistors and CPU fan speed through the 
hardware monitoring subsystem, as well as a keyboard backlight via the LED 
subsystem.

> diff --git a/drivers/platform/arm64/lenovo-yoga-slim7x-gen11-ec.c b/drivers/platform/arm64/lenovo-yoga-slim7x-gen11-ec.c
> new file mode 100644
> index 0000000000000..1ef11b9eeffab
> --- /dev/null
> +++ b/drivers/platform/arm64/lenovo-yoga-slim7x-gen11-ec.c
[ ... ]
> +static int slim7x11_ec_probe(struct i2c_client *client)
> +{
[ ... ]
> +	if (!ec->temp_present) {
> +		return dev_err_probe(dev, -ENODEV,
> +				     "no thermistor reported a usable value\n");
> +	}
> +
> +	dev_dbg(dev, "thermistors present: %#lx\n", ec->temp_present);
> +
> +	hwmon = devm_hwmon_device_register_with_info(dev, "yoga_slim7x_ec", ec,
> +						     &slim7x11_ec_chip_info, NULL);

[Severity: Low]
Does this hardware monitoring registration bypass the hwmon subsystem 
architectural layering rules? 

According to the hwmon subsystem guidelines, hardware monitoring devices 
should reside in the drivers/hwmon/ directory. If a device has secondary 
functionality or its main functionality isn't hardware monitoring, the hwmon 
features should be implemented as an auxiliary device driver, and that driver 
should reside in drivers/hwmon/.

Registering the hwmon device directly from drivers/platform/arm64/ increases 
driver complexity and bypasses hwmon maintainer review.

> +	if (IS_ERR(hwmon))
> +		return PTR_ERR(hwmon);
> +
> +	ec->kbd_led.name = "platform::kbd_backlight";

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261003202143.4697-1-okerixx@gmail.com?part=2

  reply	other threads:[~2026-10-03 20:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03 20:21 [PATCH v5 0/3] platform/arm64: Lenovo Yoga Slim 7x Gen 11 embedded controller Oleg Keri
2026-10-03 20:21 ` [PATCH v5 1/3] dt-bindings: embedded-controller: add Lenovo Yoga Slim 7x Gen 11 EC Oleg Keri
2026-10-03 20:27   ` sashiko-bot
2026-10-03 20:21 ` [PATCH v5 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver Oleg Keri
2026-10-03 20:29   ` sashiko-bot [this message]
2026-10-03 20:21 ` [PATCH v5 3/3] arm64: dts: qcom: glymur-lenovo-yoga-slim7x: add the embedded controller Oleg Keri
2026-10-03 20:25   ` sashiko-bot

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=20261003202925.1DECC1F0089B@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=okerixx@gmail.com \
    --cc=robh@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.