Re: [PATCH 1/2] dt-bindings: timer: Update TI timer to yaml

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

 



* Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> [220412 17:04]:
> On 12/04/2022 15:16, Tony Lindgren wrote:
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - ti,omap3430-timer
> > +              - ti,omap4430-timer
> > +              - ti,omap5430-timer
> > +    then:
> > +      properties:
> > +        reg:
> > +          oneOf:
> > +            - items:
> > +                - description: IO address
> > +            - items:
> > +                - description: CPU to L4 ABE IO address
> > +                - description: L3 to L4 ABE IO address
> > +        clocks:
> > +          oneOf:
> > +            - items:
> > +                - description: Functional clock
> > +            - items:
> > +                - description: Functional clock
> > +                - description: System clock
> 
> I think this can be made simpler, without oneOf:
> 
>   clocks:
>     items:
>       - description: Functional clock
>       - description: System clock
>     minItems: 1
> 
> 
> and similar for clock-names.

OK simpler sure sounds good to me considering the file path starts with
"Documentation" :)

> > +        clock-names:
> > +          oneOf:
> > +            - items:
> > +                - const: fck
> > +            - items:
> > +                - const: fck
> > +                - const: timer_sys_ck
> > +    else:
> > +      properties:
> > +        reg:
> > +          items:
> > +            - description: IO address
> > +        clocks:
> > +          items:
> > +            - description: Functional clock
> > +        clock-names:
> > +          items:
> > +            - const: fck
> 
> Hmmm, in your previous version I had impression that first clock is not
> the same on every flavor. Now it looks the same, so clocks you could
> simplify even more:
> 1. Define full list in main properties (not in allOf) with minItems:1
> 2. Use maxItems:1, for this "else:" case.
> 
> This could greatly reduce amount of code you need and keep the actual
> definition of clocks in main properties (not in allOf; allOf are only to
> constrain it).

OK thanks I'll check. I think we can assume the first clock is "fck" if
it is configured at all.

Regards,

Tony



[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