[PATCH 1/2] dt-bindings: hwmon: ti,tmp401: Add label property
Bruno Thomsen <[email protected]> Thu, 30 Jul 2026 15:30:57 +0200
| Newsgroups | org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Add support for an optional channel label property similar to other hwmon devices. Signed-off-by: Bruno Thomsen <[email protected]> --- .../devicetree/bindings/hwmon/ti,tmp401.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml index 0e8ddf0ad789..345ab6203a54 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. @@ -50,6 +56,26 @@ properties: minimum: 0 maximum: 15 +patternProperties: + "^channel@([0-2])$": + 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 + + label: + description: A descriptive name for this channel, like "ambient" or "psu". + + required: + - reg + + additionalProperties: false + allOf: - if: properties: @@ -72,6 +98,16 @@ allOf: properties: ti,beta-compensation: false + - if: + not: + properties: + compatible: + contains: + const: ti,tmp432 + then: + properties: + channel@2: false + required: - compatible - reg @@ -102,3 +138,25 @@ examples: ti,beta-compensation = <0x7>; }; }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + sensor@4c { + compatible = "ti,tmp431"; + reg = <0x4c>; + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0x0>; + label = "front"; + }; + + channel@1 { + reg = <0x1>; + label = "back"; + }; + }; + }; base-commit: 11028ab62899e4191e074ee364c712b77823a9c4 -- 2.55.0