linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp'
@ 2022-01-07  3:04 Rob Herring
  2022-01-07  7:26 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2022-01-07  3:04 UTC (permalink / raw)
  To: Iskren Chernev, Krzysztof Kozlowski, Marek Szyprowski,
	Matheus Castello, Sebastian Reichel
  Cc: linux-pm, devicetree, linux-kernel

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.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/power/supply/maxim,max17040.yaml      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml
index ffb344987a7b..6b4588a3253b 100644
--- a/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml
@@ -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.
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp'
  2022-01-07  3:04 [PATCH] dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp' Rob Herring
@ 2022-01-07  7:26 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-07  7:26 UTC (permalink / raw)
  To: Rob Herring, Iskren Chernev, Marek Szyprowski, Matheus Castello,
	Sebastian Reichel
  Cc: linux-pm, devicetree, linux-kernel

On 07/01/2022 04:04, Rob Herring wrote:
> 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.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/power/supply/maxim,max17040.yaml      | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-07  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07  3:04 [PATCH] dt-bindings: power: maxim,max17040: Fix incorrect type for 'maxim,rcomp' Rob Herring
2022-01-07  7:26 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).