Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vincent Jardin" <vjardin@free.fr>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: hwmon: pmbus: mps,mpq8785: add #thermal-sensor-cells
Date: Wed, 30 Sep 2026 14:07:21 +0000	[thread overview]
Message-ID: <20260930140721.E066D1F0089D@smtp.kernel.org> (raw)
In-Reply-To: <20260930-for-upstream-dt-mpq8785-thermal-sensor-cells-v1-1-6573c765eef8@free.fr>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: incorrect #thermal-sensor-cells constraint for single-sensor device
--

commit e3f74468edb24a9bcc5d029cc615555210a46a78
Author: Vincent Jardin <vjardin@free.fr>

dt-bindings: hwmon: pmbus: mps,mpq8785: add #thermal-sensor-cells

This patch adds the #thermal-sensor-cells property to the mpq8785 binding
schema to allow referencing the device as a thermal sensor. It sets the
cell count to 1 to match the 1-based sensor index used internally by the
PMBus core.

> diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml
> --- a/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/pmbus/mps,mpq8785.yaml
[ ... ]
> @@ -34,6 +34,9 @@ properties:
>      maximum: 4095
>      default: 706
>  
> +  "#thermal-sensor-cells":
> +    const: 1

[Severity: Medium]
Is it correct to set the cell count constraint to 1 for this hardware?

The Devicetree specification generally mandates that single-sensor devices
use a cell count of 0, as no index is needed to identify the sensor. By
forcing this to 1, it appears we might be baking a Linux-specific driver
quirk (the PMBus core's internal 1-based index) into the OS-agnostic
hardware description ABI.

Would it be better to map a Devicetree ID of 0 to the internal hwmon index 1
within the driver code itself, rather than requiring device tree authors to
pass a factually incorrect dummy index in their thermal-sensors phandle?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260930-for-upstream-dt-mpq8785-thermal-sensor-cells-v1-1-6573c765eef8@free.fr?part=1

  reply	other threads:[~2026-09-30 14:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 13:56 [PATCH] dt-bindings: hwmon: pmbus: mps,mpq8785: add #thermal-sensor-cells Vincent Jardin via B4 Relay
2026-09-30 14:07 ` sashiko-bot [this message]
2026-09-30 17:27   ` Vincent Jardin
2026-09-30 22:24     ` 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=20260930140721.E066D1F0089D@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=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vjardin@free.fr \
    /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