Re: [PATCHv1 01/11] dt-bindings: power: supply: adc-battery: add binding
From: Krzysztof Kozlowski
Date: Sun Mar 12 2023 - 07:30:26 EST
On 09/03/2023 23:50, Sebastian Reichel wrote:
> Add binding for a battery that is only monitored via ADC
> channels and simple status GPIOs.
>
> Signed-off-by: Sebastian Reichel <sre@xxxxxxxxxx>
Thank you for your patch. There is something to discuss/improve.
> +
> +maintainers:
> + - Sebastian Reichel <sre@xxxxxxxxxx>
> +
> +description: |
Don't need '|'.
> + Basic Battery, which only reports (in circuit) voltage and optionally
> + current via an ADC channel.
> +
> +allOf:
> + - $ref: power-supply.yaml#
> +
> +properties:
> + compatible:
> + const: adc-battery
> +
> + charged-gpios:
> + description:
> + GPIO which signals that the battery is fully charged.
> + maxItems: 1
> +
> + io-channels:
> + minItems: 1
> + maxItems: 3
> +
> + io-channel-names:
Simpler:
minItems: 1
items:
- const: voltage
- enum: [ current, power ]
- const: power
> + oneOf:
> + - const: voltage
> + - items:
> + - const: voltage
> + - enum:
> + - current
> + - power
> + - items:
> + - const: voltage
> + - const: current
> + - const: power
> +
What about temperature? For max17040 this was recently proposed and I
wonder whether it is desirable.
https://lore.kernel.org/all/74ba115e-9838-4983-7b93-188a8260dd8a@xxxxxxxxxx/
Best regards,
Krzysztof