Re: [PATCH] dt-bindings: nvmem: sprd-efuse: convert to YAML

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

 



On Sat, Jul 13, 2024 at 08:31:31PM +0200, Krzysztof Kozlowski wrote:
> On 13/07/2024 14:12, Stanislav Jakubek wrote:

[snip]

> > +allOf:
> > +  - $ref: nvmem.yaml#
> > +  - $ref: nvmem-deprecated-cells.yaml#
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: sprd,ums312-efuse
> > +    then:
> > +      required:
> > +        - clocks
> > +        - clock-names
> > +    else:
> > +      properties:
> > +        clocks: false
> > +        clock-names: false
> 
> Half of the binding is this "if:", so I would say they are not that
> similar. I think it would be easier to read them if these were split
> into two bindings.
> 
> Best regards,
> Krzysztof
> 

Hi Krzysztof,

pretty much this exact if-then-else is described in the "Writing Devicetree
Bindings in json-schema" documentation as a "typical case" for its usage, so
I went with that. I think that it's simple enough that it only minimally
hampers readability.

I admit that there might be some confusion, since I forgot to include an
example for the sprd,ums312-efuse (i.e. with clocks and clock-names).
Could I just add this example in V2 and keep it as-is otherwise?

Regards,
Stanislav




[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