[PATCH 1/3] dt-bindings: power: cw2015: add cw2215, cw2217, and cw2218

Krzysztof Kozlowski krzk at kernel.org
Tue Oct 27 08:57:12 PDT 2026


On 27/10/2026 14:17, Chris Morgan wrote:
>  
> -allOf:
> -  - $ref: power-supply.yaml#
> -
>  properties:
>    compatible:
> -    const: cellwise,cw2015
> +    enum:
> +      - cellwise,cw2015
> +      - cellwise,cw2215
> +      - cellwise,cw2217
> +      - cellwise,cw2218
>  
>    reg:
>      maxItems: 1
> @@ -31,8 +32,6 @@ properties:
>        it is to mail two batteries to a test facility of CellWise and receive
>        back a test report with the binary blob.
>      $ref: /schemas/types.yaml#/definitions/uint8-array
> -    minItems: 64
> -    maxItems: 64

This needs min/maxItems constraints.

>  
>    cellwise,monitor-interval-ms:
>      description:
> @@ -41,7 +40,14 @@ properties:
>  
>    power-supplies:
>      minItems: 1
> -    maxItems: 8 # Should be enough
> +    maxItems: 8  # Should be enough

Why changing? yamllint complained?

> +
> +  shunt-resistor-micro-ohms:
> +    description: |

Do not need '|' unless you need to preserve formatting.

> +      The value, in micro-ohms, of the shunt resistor used for sampling
> +      the battery current.
> +    minimum: 1000000
> +    maximum: 50000000
>  
>    monitored-battery: true
>  
> @@ -49,6 +55,28 @@ required:
>    - compatible
>    - reg
>  
> +allOf:
> +  - $ref: power-supply.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - cellwise,cw2015
> +    then:
> +      properties:
> +        shunt-resistor-micro-ohms: false
> +
> +        cellwise,battery-profile:
> +          minItems: 64
> +          maxItems: 64
> +
> +    else:
> +      properties:
> +        cellwise,battery-profile:
> +          minItems: 80
> +          maxItems: 80

default for shunt-resistor-micro-ohms? or is it required for new devices?


Best regards,
Krzysztof



More information about the Linux-rockchip mailing list