public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH 1/5] dt-bindings: iio: adc: ad7380: add AD7389-4
Date: Mon, 7 Apr 2025 08:41:53 +0200	[thread overview]
Message-ID: <20250407-adorable-copper-guillemot-00c44f@shite> (raw)
In-Reply-To: <847307bf-c612-475e-84bd-31efcbd7239f@baylibre.com>

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


  reply	other threads:[~2025-04-07  6:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 22:50 [PATCH 0/5] iio: adc: ad7380: add ad7389-4 support David Lechner
2025-04-01 22:50 ` [PATCH 1/5] dt-bindings: iio: adc: ad7380: add AD7389-4 David Lechner
2025-04-02  8:25   ` Krzysztof Kozlowski
2025-04-02 14:39     ` David Lechner
2025-04-07  6:41       ` Krzysztof Kozlowski [this message]
2025-04-07  6:42   ` Krzysztof Kozlowski
2025-04-01 22:50 ` [PATCH 2/5] iio: adc: ad7380: rename internal_ref_only David Lechner
2025-04-03 18:53   ` Nuno Sá
2025-04-01 22:50 ` [PATCH 3/5] iio: adc: ad7380: move internal reference voltage to chip_info David Lechner
2025-04-03 18:56   ` Nuno Sá
2025-04-01 22:50 ` [PATCH 4/5] iio: adc: ad7380: add ad7389-4 David Lechner
2025-04-03 18:57   ` Nuno Sá
2025-04-01 22:50 ` [PATCH 5/5] Documentation: iio: ad7380: add AD7389-4 David Lechner
2025-04-07 18:46 ` [PATCH 0/5] iio: adc: ad7380: add ad7389-4 support Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250407-adorable-copper-guillemot-00c44f@shite \
    --to=krzk@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox