From: Rob Herring <robh@kernel.org>
To: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v2 1/2] dt-bindings: hwmon: ti,tmp401: Add channel nodes with label property
Date: Tue, 1 Dec 2026 13:39:51 -0600 [thread overview]
Message-ID: <20261201193951.GA3001445-robh@kernel.org> (raw)
In-Reply-To: <20261118174334.18759-1-bruno.thomsen@gmail.com>
On Wed, Nov 18, 2026 at 06:43:33PM +0100, Bruno Thomsen wrote:
> TMP401, TMP411, TMP431 and TMP435 have one local and one remote
> temperature channel; TMP432 has two remote channels. The local channel
> measures the board where the chip sits and a remote channel measures
> whatever diode is wired to it, so only the board design says what each
> channel is.
>
> kam,am335x-emperor-mini fits a TMP431 in place of the NXP SA56004 on
> kam,am335x-emperor, at the same I2C address. On both boards the local
> channel measures the baseboard and the remote channel the FPGA's
> thermal diode. national,lm90.yaml already lets the SA56004 name its
> channels through channel nodes with a label property; add the same
> nodes to ti,tmp401 so the TMP431 channels get the same names.
>
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> ---
> v1: https://lore.kernel.org/linux-hwmon/20260730133058.14731-1-bruno.thomsen@gmail.com/
>
> Changes in v2:
> - Rewrite commit message around the board that needs per-channel
> labels, rather than referring to other bindings. (Krzysztof)
> - Quote '#address-cells' and '#size-cells' consistently with the
> patternProperties key. (Krzysztof)
> - Drop the new example and extend the existing ti,tmp431 example with
> the channel nodes instead. (Krzysztof)
> - Reword subject: the patch adds channel nodes, not just a property.
> - Rebase on the new "#thermal-sensor-cells" property, which moved
> the patternProperties context.
>
> The "kam,am335x-emperor" device tree series that consumes this is at
> https://lore.kernel.org/linux-devicetree/20260318085420.7680-1-bruno.thomsen@gmail.com/
> Its v2 adds "kam,am335x-emperor-mini", which uses these channel nodes.
> ---
> .../devicetree/bindings/hwmon/ti,tmp401.yaml | 48 +++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
> index f283b567d5b6..b162bf8c043a 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
> @@ -30,6 +30,12 @@ properties:
> reg:
> maxItems: 1
>
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> ti,extended-range-enable:
> description:
> When set, this sensor measures over extended temperature range.
> @@ -53,6 +59,26 @@ properties:
> "#thermal-sensor-cells":
> const: 1
>
> +patternProperties:
> + "^channel@([0-2])$":
Don't need ().
> + type: object
> + description: Represents channels of the device and their specific configuration.
> +
> + properties:
> + reg:
> + description: The channel number. 0 is local channel, 1-2 are remote channels.
> + items:
> + minimum: 0
> + maximum: 2
This allows "reg = <0 1>;". Drop 'items' to prevent that.
> +
> + label:
> + description: A descriptive name for this channel, like "ambient" or "psu".
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> allOf:
> - if:
> properties:
> @@ -75,6 +101,16 @@ allOf:
> properties:
> ti,beta-compensation: false
>
> + - if:
> + not:
> + properties:
> + compatible:
> + contains:
> + const: ti,tmp432
> + then:
> + properties:
> + channel@2: false
> +
> required:
> - compatible
> - reg
> @@ -103,5 +139,17 @@ examples:
> ti,extended-range-enable;
> ti,n-factor = <0x3b>;
> ti,beta-compensation = <0x7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@0 {
> + reg = <0x0>;
> + label = "mainboard";
> + };
> +
> + channel@1 {
> + reg = <0x1>;
> + label = "fpga";
> + };
> };
> };
>
> base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
> --
> 2.53.0
>
prev parent reply other threads:[~2026-12-01 19:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 17:43 [PATCH v2 1/2] dt-bindings: hwmon: ti,tmp401: Add channel nodes with label property Bruno Thomsen
2026-11-18 17:43 ` [PATCH v2 2/2] hwmon: (tmp401) add channel label support Bruno Thomsen
2026-11-18 17:49 ` sashiko-bot
2026-11-22 20:54 ` Guenter Roeck
2026-11-18 17:49 ` [PATCH v2 1/2] dt-bindings: hwmon: ti,tmp401: Add channel nodes with label property sashiko-bot
2026-12-01 19:39 ` Rob Herring [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=20261201193951.GA3001445-robh@kernel.org \
--to=robh@kernel.org \
--cc=bruno.thomsen@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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