Re: [PATCH v2 2/3] dt-bindings: clock: amlogic: convert amlogic,gxbb-aoclkc.txt to dt-schema

From: Jerome Brunet
Date: Thu Jul 06 2023 - 04:05:32 EST



On Thu 06 Jul 2023 at 09:51, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote:

> On 06/07/2023 09:15, Jerome Brunet wrote:
>>>> + then:
>>>> + properties:
>>>> + clock-names:
>>>> + minItems: 2
>>>> + items:
>>>> + - const: xtal
>>>> + - const: mpeg-clk
>>>> + - const: ext-32k-0
>>>> + - const: ext-32k-1
>>>> + - const: ext-32k-2
>>>
>>> As the names are always the same, move this to top-level and just set
>>> the length here (except the constraints are the same as top-level, so
>>> you can just drop this if/then).
>>
>> If this is done, aren't we losing information ?
>>
>> For example, "ext-32k-1" would become valid with a g12a as long as the
>> number of clocks is alright, which it is not.
>
> How it would be valid? It would be fourth item but only three are allowed.
>

I missed that the order in 'items' mattered. Thanks for the
clarification.

>>
>> I'm not concerned by the automated verification, more the information
>> provided to the users, which we used to have in the txt format.
>
> No information is lost here, unless you claim that entries are entirely
> different?
>
>
> Best regards,
> Krzysztof