* [PATCH 1/1] dt-bindings: hwmon: tmp102: move ti,tmp103 out of trivial-devices.yaml
@ 2026-08-26 21:14 Frank.Li
2026-08-26 21:20 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-08-26 21:14 UTC (permalink / raw)
To: Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Frank Li, Wensheng Wang, Cosmo Chou, Colin Huang, Nuno Sá,
Dixit Parmar, Antoni Pokusinski, Eddie James, Thorsten Blum,
open list:HARDWARE MONITORING,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: imx
From: Frank Li <Frank.Li@nxp.com>
Move ti,tmp103 binding from trivial-devices.yaml to ti,tmp102.yaml. Both
devices are single temperature sensors and update "#thermal-sensor-cells"
property to accept values 0 and 1 (passing no argument is equivalent to
passing 0 as the first argument)
Fix below CHECK_DTBS warnings:
arch/arm/boot/dts/nxp/imx/imx6dl-plym2m.dtb: temperature-sensor@70 (ti,tmp103): '#thermal-sensor-cells' does not match any of the regexes: '^pinctrl-[0-9]+$'
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 5 +++--
Documentation/devicetree/bindings/trivial-devices.yaml | 2 --
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
index 96b2e4969f78a..cd96b1d8a2d5e 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/hwmon/ti,tmp102.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: TMP102 temperature sensor
+title: TMP102/TMP103 temperature sensor
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
@@ -13,6 +13,7 @@ properties:
compatible:
enum:
- ti,tmp102
+ - ti,tmp103
interrupts:
maxItems: 1
@@ -25,7 +26,7 @@ properties:
A descriptive name for this channel, like "ambient" or "psu".
"#thermal-sensor-cells":
- const: 1
+ enum: [0, 1]
vcc-supply:
description: Power supply for tmp102
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 05f88cf81d6c6..3cdf9e0d8322d 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -506,8 +506,6 @@ properties:
- ti,lm74
# Temperature sensor with integrated fan control
- ti,lm96000
- # Low Power Digital Temperature Sensor with SMBUS/Two Wire Serial Interface
- - ti,tmp103
# Thermometer with SPI interface
- ti,tmp121
- ti,tmp122
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] dt-bindings: hwmon: tmp102: move ti,tmp103 out of trivial-devices.yaml
2026-08-26 21:14 [PATCH 1/1] dt-bindings: hwmon: tmp102: move ti,tmp103 out of trivial-devices.yaml Frank.Li
@ 2026-08-26 21:20 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-08-26 21:20 UTC (permalink / raw)
To: Frank.Li; +Cc: linux-hwmon, Frank.Li, conor+dt, robh, imx, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `#thermal-sensor-cells` property is defined with an `enum` instead of a `const` constraint, violating DT binding rules.
- [Medium] The `ti,tmp103` compatible string is added to a schema that globally allows the `interrupts` property, despite the TMP103 hardware lacking an interrupt pin.
--
commit 8ed50c8d65316077824330117ca798258a318903
Author: Frank Li <Frank.Li@nxp.com>
dt-bindings: hwmon: tmp102: move ti,tmp103 out of trivial-devices.yaml
Move the ti,tmp103 binding from trivial-devices.yaml to ti,tmp102.yaml.
Both devices are single temperature sensors. This commit also updates the
"#thermal-sensor-cells" property to accept values 0 and 1.
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> @@ -13,6 +13,7 @@ properties:
> compatible:
> enum:
> - ti,tmp102
> + - ti,tmp103
>
> interrupts:
> maxItems: 1
[Severity: Medium]
Does adding ti,tmp103 here without additional constraints allow device trees
to incorrectly define an interrupts property for the TMP103?
The TMP103 hardware lacks an interrupt pin. Because the interrupts property
is globally permitted in this schema, the schema validation might silently
pass invalid configurations that declare interrupts for ti,tmp103 nodes.
Should there be an allOf: if: conditional block to explicitly restrict the
interrupts property only to compatibles that actually support it?
[ ... ]
> @@ -25,7 +26,7 @@ properties:
> A descriptive name for this channel, like "ambient" or "psu".
>
> "#thermal-sensor-cells":
> - const: 1
> + enum: [0, 1]
[Severity: Medium]
Does changing this constraint to an enum bypass the device tree binding
rules?
Subsystem guidelines indicate that cell-count properties need a strict const
constraint matching the hardware. If the schema allows both 0 and 1 cells
for all hardware configurations, it might fail to catch incorrect cell count
assignments in device tree nodes during build-time validation.
Would it be better to enforce const: 0 or const: 1 for specific hardware
variants using conditional blocks based on the compatible string?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260826211422.3299728-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-26 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 21:14 [PATCH 1/1] dt-bindings: hwmon: tmp102: move ti,tmp103 out of trivial-devices.yaml Frank.Li
2026-08-26 21:20 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox