Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml | 3 +++ 1 file changed, 3 insertions(+)
From: Vincent Jardin <vjardin@free.fr>
The property is missing, so a board that uses it with a thermal zone fails
with dtbs_check:
tmp411@4c (ti,tmp411): '#thermal-sensor-cells' does not match any of the
regexes: '^pinctrl-[0-9]+$'
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
Changes in v2:
- Drop vcc-supply: tmp401.c has no regulator code, every hwmon binding
that declares vcc-supply today has a driver consuming it, so declaring it
as description only does not belong to this patch (Sashiko)
- Adapt the commit message
- Link to v1: https://lore.kernel.org/r/20260824-for-upstream-dt-tmp401-vcc-tsc-v1-1-ecb5ef7898bd@free.fr
---
Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
index 0e8ddf0ad7890..f283b567d5b6c 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
@@ -50,6 +50,9 @@ properties:
minimum: 0
maximum: 15
+ "#thermal-sensor-cells":
+ const: 1
+
allOf:
- if:
properties:
---
base-commit: 0a0d1d55dad570724bf8c7ea83409639cfb4be9b
change-id: 20260824-for-upstream-dt-tmp401-vcc-tsc-a16bec8352e4
Best regards,
--
Vincent Jardin <vjardin@free.fr>
On Tue, Aug 25, 2026 at 12:13:18AM +0200, Vincent Jardin wrote: > The property is missing, so a board that uses it with a thermal zone fails > with dtbs_check: > > tmp411@4c (ti,tmp411): '#thermal-sensor-cells' does not match any of the Cannot find such node. How can I reproduce this warning? If it is non-reproducible, then it is not a valid reason for a change and instead driver implementing thermal sensor would be the proper reason. > regexes: '^pinctrl-[0-9]+$' Best regards, Krzysztof
Hi Krzysztof,
Le 28/08/26 12:02, Krzysztof Kozlowski a écrit :
> On Tue, Aug 25, 2026 at 12:13:18AM +0200, Vincent Jardin wrote:
> > The property is missing, so a board that uses it with a thermal zone fails
> > with dtbs_check:
> >
> > tmp411@4c (ti,tmp411): '#thermal-sensor-cells' does not match any of the
>
> Cannot find such node.
>
> How can I reproduce this warning? If it is non-reproducible, then it is
> not a valid reason for a change and instead driver implementing thermal
> sensor would be the proper reason.
Hmm, you are right, it is not reproducible from the main tree, I was confused
with my ongoing developments: no in-tree DTS uses a tmp401-family
chip as a thermal sensor, so dtbs_check has nothing to complain about.
The warning came from a DTS that does, which is exactly the usage the
driver now supports and you are right that the driver, not the
warning, is the proper reason.
Since commit
a3b61ba2558e ("hwmon: (tmp401) register with thermal subsystem"),
in v7.3-rc1, tmp401 sets HWMON_C_REGISTER_TZ
-> the hwmon core calls devm_thermal_of_zone_register() for every
temperature channel.
My goal is to unify/follow the other ones such as national,lm90.yaml,
ti,tmp102.yaml or adi,adt7470.yaml already pair "const: 1" with drivers
that set HWMON_C_REGISTER_TZ.
v3 justifies the change from the driver and drops the dtbs_check excerpt.
The diff is unchanged.
Thanks for catching it and sorry for the confusions,
Vincent
On 8/28/26 03:02, Krzysztof Kozlowski wrote: > On Tue, Aug 25, 2026 at 12:13:18AM +0200, Vincent Jardin wrote: >> The property is missing, so a board that uses it with a thermal zone fails >> with dtbs_check: >> >> tmp411@4c (ti,tmp411): '#thermal-sensor-cells' does not match any of the > > Cannot find such node. > > How can I reproduce this warning? If it is non-reproducible, then it is > not a valid reason for a change and instead driver implementing thermal > sensor would be the proper reason. > The driver does register thermal zones. Since #thermal-sensor-cells is mandatory for using it, I would think that the property is needed. However, not all chips supported by the driver (and this bindings file) have more than one channel, so I suspect that the value range might need to be "enum: [0, 1]". Thanks, Guenter
Hi Guenter, > The driver does register thermal zones. Since #thermal-sensor-cells is > mandatory for using it, I would think that the property is needed. agree. thanks. > However, not all chips supported by the driver (and this bindings file) > have more than one channel, so I suspect that the value range might > need to be "enum: [0, 1]". I could switch to "enum: [0, 1]" if you would still prefer it, but tmp401_probe() sets temp_channel_config[0] and [1] unconditionally (local plus one remote diode) and tmp432 adds [2] for its second remote. So each case in this binding has at least two channels and the channel index is always meaningful. That is why "const: 1" is used, matching national,lm90.yaml, which covers a mix of 2 and 3 channel chips. I'll send a v3, that does not change the yaml by that applies the proper comments per Krzysztof's feedbacks. best regards, Vincent
On 9/2/26 07:26, Vincent Jardin wrote: > Hi Guenter, > >> The driver does register thermal zones. Since #thermal-sensor-cells is >> mandatory for using it, I would think that the property is needed. > > agree. thanks. > >> However, not all chips supported by the driver (and this bindings file) >> have more than one channel, so I suspect that the value range might >> need to be "enum: [0, 1]". > > I could switch to "enum: [0, 1]" if you would still prefer it, but > tmp401_probe() sets temp_channel_config[0] and [1] unconditionally (local plus > one remote diode) and tmp432 adds [2] for its second remote. > So each case in this binding has at least two channels and the channel index is always > meaningful. That is why "const: 1" is used, matching national,lm90.yaml, > which covers a mix of 2 and 3 channel chips. > Makes sense. Sorry, I missed that all chips have at least two sensors. Thanks, Guenter > I'll send a v3, that does not change the yaml by that applies the proper comments > per Krzysztof's feedbacks. > > best regards, > Vincent
© 2016 - 2026 Red Hat, Inc.