From: Jonathan Cameron <jic23@kernel.org>
To: Radu Sabau via B4 Relay <devnull+radu.sabau.analog.com@kernel.org>
Cc: radu.sabau@analog.com, "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Linus Walleij" <linusw@kernel.org>,
"Bartosz Golaszewski" <brgl@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: iio: adc: add bindings for AD4691 family
Date: Thu, 5 Mar 2026 17:45:59 +0000 [thread overview]
Message-ID: <20260305174559.1ded5173@jic23-huawei> (raw)
In-Reply-To: <20260305-ad4692-multichannel-sar-adc-driver-v1-1-336229a8dcc7@analog.com>
On Thu, 05 Mar 2026 14:23:27 +0200
Radu Sabau via B4 Relay <devnull+radu.sabau.analog.com@kernel.org> wrote:
> From: Radu Sabau <radu.sabau@analog.com>
>
> Add YAML bindings and dt-bindings header for the Analog Devices AD4691
> family of multichannel SAR ADCs (AD4691, AD4692, AD4693, AD4694).
>
> The binding describes five operating modes selectable via the
> adi,spi-mode property, optional PWM/clock for CNV Clock and CNV Burst
> modes, GPIO pins, voltage supplies and the trigger-source interface for
> SPI Engine offload operation.
>
> Signed-off-by: Radu Sabau <radu.sabau@analog.com>
Hi Radu, I'm going to focus on mode... Mostly because things called
mode are usually a sign of mixing up different aspects of the board
design...
> +
> + adi,spi-mode:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1, 2, 3, 4]
> + description: |
> + Selects the ADC operating mode:
> + 0 - CNV Clock Mode: External PWM drives CNV pin, samples at PWM rate.
> + 1 - CNV Burst Mode: PWM triggers burst cycles, internal oscillator
> + drives conversions within each burst.
> + 2 - Autonomous Mode: Internal oscillator drives conversions, software
> + starts/stops via register write.
> + 3 - SPI Burst Mode: Similar to Autonomous Mode but optimized for
> + SPI burst reads.
> + 4 - Manual Mode: CNV is directly tied to SPI CS. Each SPI transfer
> + triggers a conversion and returns previous result (pipelined).
Which of these are wiring related?
0 and 1 need a PWM wired up. So describe a PWM. If there is one we need
to figure which we want so indication provided by userspace.
2 and 3 don't need anything beyond bus.
4 probably does need a binding but that's about whether that wire connection
is there or not.
> +
> + vio-supply:
> + description: I/O voltage supply (1.71V to 1.89V or VDD).
> +
> + vref-supply:
> + description:
> + External reference voltage supply (2.4V to 5.25V). Mutually exclusive
> + with vrefin-supply.
Enforce that via a rule as you do below. No need to document it here as well.
> +
> + vrefin-supply:
> + description:
> + Internal reference buffer input supply. Mutually exclusive with
> + vref-supply.
> +
> + # AD4694 (20-bit) does not support Manual Mode
That's a driver thing. Not something we want in the binding.
> + - if:
> + properties:
> + compatible:
> + const: adi,ad4694
> + then:
> + properties:
> + adi,spi-mode:
> + enum: [0, 1, 2, 3]
> +
> + # CNV Clock Mode and CNV Burst Mode require PWM and clock
> + - if:
> + properties:
> + adi,spi-mode:
> + enum: [0, 1]
This is backwards. Define these as optional properties and use that to
limit what the driver can offer as ways it can run. Maybe they
only make sense together in which case add that rule.
> + then:
> + required:
> + - clocks
> + - clock-names
> + - pwms
> + - pwm-names
> +
> + # Non-Manual modes (0-3) without SPI offload require a DRDY interrupt.
> + # Offload configurations expose '#trigger-source-cells' instead.
> + - if:
> + properties:
> + adi,spi-mode:
> + enum: [0, 1, 2, 3]
> + not:
> + required:
> + - '#trigger-source-cells'
> + then:
> + required:
> + - interrupts
> + - interrupt-names
> +
>
next prev parent reply other threads:[~2026-03-05 17:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 12:23 [PATCH 0/4] iio: adc: ad4691: add driver for AD4691 multichannel SAR ADC family Radu Sabau via B4 Relay
2026-03-05 12:23 ` [PATCH 1/4] dt-bindings: iio: adc: add bindings for AD4691 family Radu Sabau via B4 Relay
2026-03-05 12:44 ` Krzysztof Kozlowski
2026-03-05 17:45 ` Jonathan Cameron [this message]
2026-03-06 11:55 ` Sabau, Radu bogdan
2026-03-07 18:48 ` David Lechner
2026-03-08 18:28 ` Jonathan Cameron
2026-03-09 8:57 ` Sabau, Radu bogdan
2026-03-09 14:34 ` David Lechner
2026-03-05 12:23 ` [PATCH 2/4] iio: adc: ad4691: add initial driver " Radu Sabau via B4 Relay
2026-03-05 19:12 ` Jonathan Cameron
2026-03-06 17:30 ` Markus Elfring
2026-03-05 12:23 ` [PATCH 3/4] iio: adc: ad4691: add triggered buffer support Radu Sabau via B4 Relay
2026-03-05 19:21 ` Jonathan Cameron
2026-03-05 12:23 ` [PATCH 4/4] iio: adc: ad4691: add SPI offload support Radu Sabau via B4 Relay
2026-03-05 19:26 ` Jonathan Cameron
2026-03-06 12:05 ` [PATCH 0/4] iio: adc: ad4691: add driver for AD4691 multichannel SAR ADC family Andy Shevchenko
2026-03-06 12:39 ` Sabau, Radu bogdan
2026-03-06 14:33 ` Andy Shevchenko
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=20260305174559.1ded5173@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+radu.sabau.analog.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=radu.sabau@analog.com \
--cc=robh@kernel.org \
--cc=ukleinek@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