* [PATCH] dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells
@ 2026-08-24 15:46 Vincent Jardin via B4 Relay
2026-08-24 15:57 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-08-24 15:46 UTC (permalink / raw)
To: Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-hwmon, devicetree, linux-kernel, Vincent Jardin
From: Vincent Jardin <vjardin@free.fr>
Both properties are used by the driver that backs this binding, and
neither is described, so a board that supplies either fails dtbs_check:
tmp411@4c (ti,tmp411): '#thermal-sensor-cells', 'vcc-supply' do not
match any of the regexes: '^pinctrl-[0-9]+$'
vcc-supply is fetched in lm90_probe():
drivers/hwmon/lm90.c:2777
err = devm_regulator_get_enable(dev, "vcc");
so a board with the sensor behind a switched rail has no other way to
describe it, and omitting it means the chip is probed with its supply
possibly off.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
index 0e8ddf0ad7890..69f77aec01a33 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
@@ -50,6 +50,11 @@ properties:
minimum: 0
maximum: 15
+ vcc-supply: true
+
+ "#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>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells
2026-08-24 15:46 [PATCH] dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells Vincent Jardin via B4 Relay
@ 2026-08-24 15:57 ` sashiko-bot
2026-08-24 22:09 ` Vincent Jardin
0 siblings, 1 reply; 3+ messages in thread
From: sashiko-bot @ 2026-08-24 15:57 UTC (permalink / raw)
To: Vincent Jardin; +Cc: linux-hwmon, devicetree, conor+dt, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message contains a major factual error: it justifies adding the `vcc-supply` property by claiming it is fetched by `lm90_probe()` in `drivers/hwmon/lm90.c`, but the `ti,tmp401` and `ti,tmp411` devices are actually backed by `drivers/hwmon/tmp401.c`, which completely lacks regulator support.
--
--- Patch [1]: [PATCH] dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells ---
commit bb8183d96c519f5d3050a2f78596d89eca815884
Author: Vincent Jardin <vjardin@free.fr>
dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells
This commit updates the ti,tmp401 device tree binding to include the
vcc-supply and #thermal-sensor-cells properties. It aims to fix
dtbs_check warnings for boards that describe these features.
> vcc-supply is fetched in lm90_probe():
>
> drivers/hwmon/lm90.c:2777
> err = devm_regulator_get_enable(dev, "vcc");
>
> so a board with the sensor behind a switched rail has no other way to
> describe it, and omitting it means the chip is probed with its supply
> possibly off.
[Severity: Medium]
Is this justification accurate for the ti,tmp401 binding?
The ti,tmp401 and ti,tmp411 devices appear to be backed by the driver
in drivers/hwmon/tmp401.c, rather than lm90.c.
Looking at tmp401_probe(), it currently lacks regulator support and does
not call devm_regulator_get_enable(). Does this mean boards using the
tmp401 sensor with a switched rail will still fail to power up the chip
since the driver ignores the property?
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
> index 0e8ddf0ad7890..69f77aec01a33 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml
[ ... ]
> @@ -50,6 +50,11 @@ properties:
> minimum: 0
> maximum: 15
>
> + vcc-supply: true
[Severity: Medium]
While adding this property correctly describes the hardware and silences the
dtbs_check warnings, should the drivers/hwmon/tmp401.c driver also be
updated in a companion patch so it actually parses and enables this supply?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824-for-upstream-dt-tmp401-vcc-tsc-v1-1-ecb5ef7898bd@free.fr?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells
2026-08-24 15:57 ` sashiko-bot
@ 2026-08-24 22:09 ` Vincent Jardin
0 siblings, 0 replies; 3+ messages in thread
From: Vincent Jardin @ 2026-08-24 22:09 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-hwmon, devicetree, conor+dt, robh
Hi Bot,
Le 24/08/26 15:57, sashiko-bot@kernel.org a écrit :
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The commit message contains a major factual error: it justifies adding the `vcc-supply` property by claiming it is fetched by `lm90_probe()` in `drivers/hwmon/lm90.c`, but the `ti,tmp401` and `ti,tmp411` devices are actually backed by `drivers/hwmon/tmp401.c`, which completely lacks regulator support.
You have the points.
The vcc-supply justification in the commit message is wrong assuption for
this device.
v2 will drop vcc-supply and it will keep only #thermal-sensor-cells.
The #thermal-sensor-cells topics is better explained in v2.
Thanks for the review,
Vincent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-24 22:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24 15:46 [PATCH] dt-bindings: hwmon: ti,tmp401: add vcc-supply and #thermal-sensor-cells Vincent Jardin via B4 Relay
2026-08-24 15:57 ` sashiko-bot
2026-08-24 22:09 ` Vincent Jardin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox