Linux Power Management development
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chris Morgan <macroalpha82@gmail.com>, linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org,
	heiko@sntech.de, conor+dt@kernel.org, krzk+dt@kernel.org,
	robh@kernel.org, sre@kernel.org, t.schramm@manjaro.org,
	Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH 1/3] dt-bindings: power: cw2015: add cw2215, cw2217, and cw2218
Date: Tue, 27 Oct 2026 16:57:12 +0100	[thread overview]
Message-ID: <83695285-207e-4d0f-ada0-2273953e2eb9@kernel.org> (raw)
In-Reply-To: <20261027131751.1724448-2-macroalpha82@gmail.com>

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

  reply	other threads:[~2026-10-27 15:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 13:17 [PATCH 0/3] Add Cellwise CW2217 Chris Morgan
2026-10-27 13:17 ` [PATCH 1/3] dt-bindings: power: cw2015: add cw2215, cw2217, and cw2218 Chris Morgan
2026-10-27 15:57   ` Krzysztof Kozlowski [this message]
2026-10-27 13:17 ` [PATCH 2/3] power: supply: cw2217: Add support for Cellwise cw2217 Chris Morgan
2026-10-27 13:34   ` Shawn Lin
2026-10-27 15:46     ` Chris Morgan
2026-10-27 13:17 ` [PATCH 3/3] arm64: dts: rockchip: Add Battery Gauge to Anbernic Vita-Pro Chris Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83695285-207e-4d0f-ada0-2273953e2eb9@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=macroalpha82@gmail.com \
    --cc=macromorgan@hotmail.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=t.schramm@manjaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox