Re: [PATCH v2 2/2] dt-bindings: power: supply: stc3117: Convert to DT schema format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/01/2024 14:35, Bhavin Sharma wrote:
> Convert the binding to DT schema format.

Subject: It's totally wrong. There is no conversion. If you claim
otherwise, please point me to removal of any file in this patch.

> 
> Changes in V2 resolved below errors:

Changelog goes under ---

> 	1. string value is redundantly quoted with any quotes (quoted-strings)
> 	2. found character '\t' that cannot start any token

Heh, you still did not test it.


> 
> Signed-off-by: Bhavin Sharma <bhavin.sharma@xxxxxxxxxxxxxxxxx>
> ---
>  .../bindings/power/supply/stc3117-fg.yaml     | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/stc3117-fg.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/stc3117-fg.yaml b/Documentation/devicetree/bindings/power/supply/stc3117-fg.yaml
> new file mode 100644
> index 000000000..d6607a5ea
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/stc3117-fg.yaml
> @@ -0,0 +1,41 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/stc3117-fg.yaml#

Namke matching compatible.

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectronics STC3117 Fuel Gauge Unit Power Supply
> +
> +maintainers:
> +  - Bhavin Sharma <bhavin.sharma@xxxxxxxxxxxxxxxxx>
> +  - Hardevsinh Palaniya <hardevsinh.palaniya@xxxxxxxxxxxxxxxxx>
> +
> +allOf:
> +  - $ref: power-supply.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - st,stc3117-fgu

Can stc3117 be anything else? IOW, why "fgu" is needed?

> +
> +  reg:
> +    maxItems: 1

No properties? No resources?

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

unevaluatedProperties instead

> +
> +examples:
> +  - |
> +    &i2c6 {

Just i2c {

> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      st3117: stc3117@70 {

Drop label.

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation


> +        compatible = "st,stc3117-fgu";
> +        reg = <0x70>;
> +        status = "okay";

Drop status. Add missing properties for this to be complete.

> +      };
> +    };

Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux