Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Oleg Keri" <okerixx@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver
Date: Tue, 08 Sep 2026 18:41:44 +0000	[thread overview]
Message-ID: <20260908184144.946C91F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908183403.2107-3-okerixx@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The driver registers a hardware monitoring device directly from the platform subsystem instead of using an auxiliary device driver in drivers/hwmon/.
--

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

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

This commit adds an embedded controller driver for the Lenovo Yoga Slim 7x
Gen 11 laptop on the Snapdragon X2 Elite platform. It exposes hwmon channels
for thermistors, battery cell voltages, and fan speed, as well as an LED for
the keyboard backlight and hotkey input events.

> 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
> --- /dev/null
> +++ b/drivers/platform/arm64/lenovo-yoga-slim7x-gen11-ec.c
[ ... ]
> +static int yoga_ec_probe(struct i2c_client *client)
> +{
[ ... ]
> +	dev_dbg(dev, "thermistors present: %#lx\n", ec->temp_present);
> +
> +	hwmon = devm_hwmon_device_register_with_info(dev, "yoga_slim7x_ec", ec,
> +						     &yoga_ec_chip_info, NULL);

[Severity: Medium]
Does this bypass the hwmon subsystem maintainer review and violate subsystem
architectural layering rules by registering a hwmon device directly from a
platform multi-function device driver?

The driver registers a hardware monitoring device directly from the platform
subsystem. Should this hardware monitoring functionality be implemented as an
auxiliary device driver residing in drivers/hwmon/ instead?

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

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

      reply	other threads:[~2026-09-08 18:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 18:34 [PATCH v2 0/2] platform/arm64: Lenovo Yoga Slim 7x Gen 11 embedded controller Oleg Keri
2026-09-08 18:34 ` [PATCH v2 1/2] dt-bindings: embedded-controller: add Lenovo Yoga Slim 7x Gen 11 EC Oleg Keri
2026-09-08 18:38   ` sashiko-bot
2026-09-08 18:34 ` [PATCH v2 2/2] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver Oleg Keri
2026-09-08 18:41   ` sashiko-bot [this message]

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=20260908184144.946C91F00A3A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox