Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Oleg Keri" <okerixx@gmail.com>
Cc: linux-hwmon@vger.kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v4 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver
Date: Tue, 22 Sep 2026 17:06:41 +0000	[thread overview]
Message-ID: <20260922170641.B9E8B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922165737.260443-3-okerixx@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] hwmon: subsystem layering violation by registering hwmon device from platform driver
--

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

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

This commit adds an Embedded Controller (EC) driver for the Lenovo Yoga Slim
7x Gen 11 laptop on the Snapdragon X2 Elite platform. It provides access to
thermistors, battery cell voltages, CPU fan speed, and keyboard backlight
control over I2C.

> 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..a16849877dd7b
> --- /dev/null
> +++ b/drivers/platform/arm64/lenovo-yoga-slim7x-gen11-ec.c
[ ... ]
> +	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: Medium]
Does registering the hardware monitoring device directly from outside the
drivers/hwmon/ directory violate the subsystem guidelines? 

The HWMON guide dictates that hardware monitoring functionality in
multi-function devices should be implemented as an auxiliary device driver
residing in drivers/hwmon/, and that registering from outside this
directory bypasses maintainer review.

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

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

  reply	other threads:[~2026-09-22 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 16:57 [PATCH v4 0/3] platform/arm64: Lenovo Yoga Slim 7x Gen 11 embedded controller Oleg Keri
2026-09-22 16:57 ` [PATCH v4 1/3] dt-bindings: embedded-controller: add Lenovo Yoga Slim 7x Gen 11 EC Oleg Keri
2026-09-22 17:04   ` sashiko-bot
2026-09-22 16:57 ` [PATCH v4 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver Oleg Keri
2026-09-22 17:06   ` sashiko-bot [this message]
2026-09-22 16:57 ` [PATCH v4 3/3] arm64: dts: qcom: glymur-lenovo-yoga-slim7x: add the embedded controller Oleg Keri
2026-09-22 17:01   ` sashiko-bot
2026-09-22 17:51   ` Oleg Keri
2026-09-22 20:29   ` Abel Vesa

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=20260922170641.B9E8B1F000FF@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