Skip to contentSkip to conversation

dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp'

PATCH In review Rob Herring 2 participants 2 messages Jan 7, 2022

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp'

The 'maxim,rcomp' is defined as a uint32, but the description and users all say it is uint8-array with 1 or 2 elements. The tools missed checking this case.

---
 .../devicetree/bindings/power/supply/maxim,max17040.yaml      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml +3 -1
index ffb344987a7b..6b4588a3253b 100644
@@ -44,7 +44,9 @@ properties:
       SoC == State of Charge == Capacity.
 
   maxim,rcomp:
-    $ref: /schemas/types.yaml#/definitions/uint32
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    minItems: 1
+    maxItems: 2
     description: |
       A value to compensate readings for various battery chemistries and operating temperatures.
       max17040,41 have 2 byte rcomp, default to 0x97 0x00.
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Rob Herring

The 'maxim,rcomp' is defined as a uint32, but the description and users all say it is uint8-array with 1 or 2 elements. The tools missed checking this case.

---
 .../devicetree/bindings/power/supply/maxim,max17040.yaml      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Best regards,
Krzysztof