Re: [PATCH v4] dt-bindings: rtc: isl1208: Convert to json-schema

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

 



On 10/05/2023 08:52, Geert Uytterhoeven wrote:
> Hi Trent,
> 
> On Tue, May 9, 2023 at 9:03 PM Trent Piepho <tpiepho@xxxxxxxxx> wrote:
>> On Tue, May 9, 2023 at 6:12 AM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
>>> +
>>> +  interrupt-names:
>>
>> Shouldn't this have minItems: 1 and maxItems: 2 as well?
> 
>>> +    then:
>>> +      properties:
>>> +        interrupts:
>>> +          maxItems: 2
>>> +    else:
>>> +      properties:
>>> +        interrupts:
>>> +          maxItems: 1
>>
>> Add interrupt-names here too.
> 
> Isn't the relation interrupts <=> interrupt-names enforced by the
> tooling?

No, every constrain or schema code for one should be duplicated for
second. These can be done however in different ways, e.g.
interrupts:
  minItems: 1
  maxitems: 2
interrupt-names:
  minItems: 1
  items:
    - foo
    - bar

but the outcome - so how many items are expected - must be the same in
every branch/condition.

Best regards,
Krzysztof




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux