[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250407-adorable-copper-guillemot-00c44f@shite>
Date: Mon, 7 Apr 2025 08:41:53 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
Michael Hennerich <Michael.Hennerich@...log.com>, Nuno Sá <nuno.sa@...log.com>,
Jonathan Corbet <corbet@....net>, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 1/5] dt-bindings: iio: adc: ad7380: add AD7389-4
On Wed, Apr 02, 2025 at 09:39:43AM GMT, David Lechner wrote:
> On 4/2/25 3:25 AM, Krzysztof Kozlowski wrote:
> > On Tue, Apr 01, 2025 at 05:50:08PM -0500, David Lechner wrote:
> >> Add compatible and quirks for AD7389-4. This is essentially the same as
> >> AD7380-4 but instead of having no internal reference, it has no external
> >> reference voltage supply.
> >
> > So neither refio nor refin, but your schema says:
> >
> >> + then:
> >> + properties:
> >> + refio-supply: false
> >
> > So what about refin, which is also external reference?
>
> This is already handled by the existing if statement:
>
> - if:
> properties:
> compatible:
> enum:
> - adi,ad7380-4
> - adi,adaq4370-4
> - adi,adaq4380-4
> - adi,adaq4381-4
> then:
> properties:
> refio-supply: false
> required:
> - refin-supply
> else:
> properties:
> refin-supply: false
The way the if-then are organized there is not how I would expect, so
thus confusion. Each if: condition has else:, so to understand what
applies to given model one has to read everything!
And you add here second method - if without else.
This is supposed to be simple:
if:
- model_foo
then:
...
if:
- model_bar
then:
...
if:
- model_baz
then:
...
Best regards,
Krzysztof
Powered by blists - more mailing lists