Skip to contentSkip to conversation

dt-bindings: hwmon: ti,tmp421: Fix type for 'ti,n-factor'

PATCH Applied Rob Herring 3 participants 3 messages Apr 13, 2022

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: hwmon: ti,tmp421: Fix type for 'ti,n-factor'

'ti,n-factor' is read as a 32-bit signed value, so the type and constraints are wrong. The same property is also defined for ti,tmp464 and is correct.

The constraints should also not be under 'items' as this property is not an array.

Cc Jean Delvare <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
---
 Documentation/devicetree/bindings/hwmon/ti,tmp421.yaml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/hwmon/ti,tmp421.yaml +3 -4
index 36f649938fb7..a6f1fa75a67c 100644
@@ -58,10 +58,9 @@ patternProperties:
         description: |
           The value (two's complement) to be programmed in the channel specific N correction register.
           For remote channels only.
-        $ref: /schemas/types.yaml#/definitions/uint32
-        items:
-          minimum: 0
-          maximum: 255
+        $ref: /schemas/types.yaml#/definitions/int32
+        minimum: -128
+        maximum: 127
 
     required:
       - reg
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Rob Herring

'ti,n-factor' is read as a 32-bit signed value, so the type and constraints are wrong. The same property is also defined for ti,tmp464 and is correct.

The constraints should also not be under 'items' as this property is not an array.

Best regards,
Krzysztof

maintainer Applied
#2 lore raw
In reply to Rob Herring
Quoted 11 lines · Rob Herring

'ti,n-factor' is read as a 32-bit signed value, so the type and constraints are wrong. The same property is also defined for ti,tmp464 and is correct.

The constraints should also not be under 'items' as this property is not an array.

Cc Jean Delvare <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>

Applied.

Thanks,
Guenter

Quoted 22 lines
---
 Documentation/devicetree/bindings/hwmon/ti,tmp421.yaml | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/hwmon/ti,tmp421.yaml +3 -4
index 36f649938fb7..a6f1fa75a67c 100644
@@ -58,10 +58,9 @@ patternProperties:
         description: |
           The value (two's complement) to be programmed in the channel specific N correction register.
           For remote channels only.
-        $ref: /schemas/types.yaml#/definitions/uint32
-        items:
-          minimum: 0
-          maximum: 255
+        $ref: /schemas/types.yaml#/definitions/int32
+        minimum: -128
+        maximum: 127
 
     required:
       - reg