Re: [PATCH v6 2/3] dt-bindings: iio: adc: add adi,max11410.yaml

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

 



On 02/10/2022 15:06, Jonathan Cameron wrote:
>>> +  interrupts:
>>> +    minItems: 1
>>> +    maxItems: 2
>>> +
>>> +  interrupt-names:
>>> +    description: Name of the gpio pin of max11410 used for IRQ
>>> +    items:
>>> +      - enum:
>>> +          - gpio0
>>> +          - gpio1  
>>
>> This is wrong. You said in interrupts you can have two items, but here
>> you list only one. I don't know what do you want to achieve here.
> 
> Aim is 0, 1 or 2 interrupts + knowing which ones they are.
> Device has two pins that have very similar functionality and board
> designers are likely to pick one or the two more or less at random depending
> on which trace is easier to route.
> 
> So my guess is this needs minItems, maxItems.

The current choice allows 0 or 1 interrupt. If you want 0-2 then it
should be:

minItems: 1
items:
  - enum: [gpio0, gpio1]
  - const: gpio1

This one would also work:

minItems: 1
maxItems: 2
items:
  enum: [gpio0, gpio1]

but the order of interrupts should be rather defined, so I would prefer
first.


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