[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5c4016f8-f915-a5ce-6213-d50f69699b79@linaro.org>
Date: Mon, 3 Oct 2022 08:53:57 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org
Cc: Ibrahim Tilki <Ibrahim.Tilki@...log.com>, Nuno.Sa@...log.com,
Nurettin.Bolucu@...log.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/3] dt-bindings: iio: adc: add adi,max11410.yaml
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
Powered by blists - more mailing lists