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 13:37, Biju Das wrote:
> Hi Krzysztof Kozlowski,
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
>> Sent: Wednesday, May 10, 2023 7:58 AM
>> To: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>; Trent Piepho
>> <tpiepho@xxxxxxxxx>
>> Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; Alessandro Zummo
>> <a.zummo@xxxxxxxxxxxx>; Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>;
>> Rob Herring <robh+dt@xxxxxxxxxx>; Krzysztof Kozlowski
>> <krzysztof.kozlowski+dt@xxxxxxxxxx>; linux-rtc@xxxxxxxxxxxxxxx;
>> devicetree@xxxxxxxxxxxxxxx; Geert Uytterhoeven <geert+renesas@xxxxxxxxx>;
>> Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>; linux-renesas-
>> soc@xxxxxxxxxxxxxxx
>> Subject: Re: [PATCH v4] dt-bindings: rtc: isl1208: Convert to json-schema
>>
>> 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.
> 
> But this will result in duplication of items in 2 places right?
> 
> One like the above and other one in conditional branch.


No. Constraints must be the same, so for example minItems.

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