[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e8f9526-f7cf-46b1-bdb3-831dc04543f3@kernel.org>
Date: Fri, 29 Nov 2024 12:48:34 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Bhavin Sharma <bhavin.sharma@...iconsignals.io>, sre@...nel.org,
krzk+dt@...nel.org
Cc: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>,
Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: power: supply: Add STC3117 Fuel Gauge
On 29/11/2024 12:40, Bhavin Sharma wrote:
> The STC3117 provides a simple fuel gauge via I2C.
> Add a DT schema to describe how to set it up in the device tree.
>
> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
> Signed-off-by: Bhavin Sharma <bhavin.sharma@...iconsignals.io>
Your SoBs are odd... second patch has totally reversed path comparing to
this one. What do you want to express here?
> ---
> .../bindings/power/supply/st,stc3117.yaml | 81 +++++++++++++++++++
> 1 file changed, 81 insertions(+)
> +
> + monitored-battery:
> + description: |
> + The fuel gauge uses the following battery properties:
> + - charge-full-design-microamp-hours
> + - voltage-min-design-microvolt
> + - voltage-max-design-microvolt
> +
> + sense-resistor:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: Current sense resistor in milliohms
phandle cannot be in milliohms... Anyway, use existing widely used
property: shunt-resistor-micro-ohms
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - monitored-battery
> + - sense-resistor
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + bat: battery {
> + compatible = "simple-battery";
> + charge-full-design-microamp-hours = <2600000>;
> + voltage-min-design-microvolt = <3300000>;
> + voltage-max-design-microvolt = <4250000>;
> + };
Drop battery node, not needed for example.
> +
> + battery@70 {
> + compatible = "st,stc3117";
> + reg = <0x70>;
> + interrupt-parent = <&gpio0>;
> + interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint.
Best regards,
Krzysztof
Powered by blists - more mailing lists