Linux Documentation
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Trevor Gamblin" <tgamblin@baylibre.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"David Lechner" <dlechner@baylibre.com>,
	"Uwe Kleine-Konig" <u.kleine-koenig@baylibre.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: iio: adc: add AD762x/AD796x ADCs
Date: Sat, 10 Aug 2024 14:10:47 +0200	[thread overview]
Message-ID: <03eca85c-50d7-4ff0-a5b6-83e3322cb04d@kernel.org> (raw)
In-Reply-To: <20240809-ad7625_r1-v2-1-f85e7ac83150@baylibre.com>

On 09/08/2024 20:41, Trevor Gamblin wrote:
> Add a binding specification for the Analog Devices Inc. AD7625,
> AD7626, AD7960, and AD7961 ADCs.
> 

Thank you for your patch. There is something to discuss/improve.

> +allOf:
> +  - if:
> +      required:
> +        - ref-supply
> +    then:
> +      # refin-supply is not needed if ref-supply is given

Not needed or not allowed? Schema says the latter.

> +      properties:
> +        refin-supply: false
> +  - if:
> +      required:
> +        - refin-supply
> +    then:
> +      # ref-supply is not needed if refin-supply is given
> +      properties:
> +        ref-supply: false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7625
> +              - adi,ad7626
> +    then:
> +      properties:
> +        en2-gpios: false
> +        en3-gpios: false
> +        adi,en2-always-on: false
> +        adi,en3-always-on: false
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7960
> +              - adi,ad7961
> +    then:
> +      # ad796x parts must have one of the two supplies
> +      oneOf:
> +        - required: [ref-supply]
> +        - required: [refin-supply]

That's duplicating first and second if. And all three - comment, first
if:then: and this one here is kind of contradictory so I don't know what
you want to achieve.


> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    adc {
> +        compatible = "adi,ad7625";
> +        vdd1-supply = <&supply_5V>;
> +        vdd2-supply = <&supply_2_5V>;
> +        vio-supply = <&supply_2_5V>;
> +        io-backends = <&axi_adc>;
> +        clocks = <&ref_clk>;
> +        pwms = <&axi_pwm_gen 0 0>, <&axi_pwm_gen 1 0>;
> +        pwm-names = "cnv", "clk_gate";

Make example complete - en0 or en1 GPIOs or whatever else is applicable.


Best regards,
Krzysztof


  reply	other threads:[~2024-08-10 12:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 18:41 [PATCH v2 0/3] iio: adc: add new ad7625 driver Trevor Gamblin
2024-08-09 18:41 ` [PATCH v2 1/3] dt-bindings: iio: adc: add AD762x/AD796x ADCs Trevor Gamblin
2024-08-10 12:10   ` Krzysztof Kozlowski [this message]
2024-08-12 13:41     ` Trevor Gamblin
2024-08-12 13:55       ` Krzysztof Kozlowski
2024-08-09 18:41 ` [PATCH v2 2/3] iio: adc: ad7625: add driver Trevor Gamblin
2024-08-17 11:47   ` Jonathan Cameron
2024-08-19 12:38     ` Trevor Gamblin
2024-08-09 18:41 ` [PATCH v2 3/3] docs: iio: new docs for ad7625 driver Trevor Gamblin

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=03eca85c-50d7-4ff0-a5b6-83e3322cb04d@kernel.org \
    --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=lars@metafoo.de \
    --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 \
    --cc=tgamblin@baylibre.com \
    --cc=u.kleine-koenig@baylibre.com \
    /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