Re: [PATCH v9 0/3] iio: adc: ad4080: add support for AD4880 dual-channel ADC
From: Jonathan Cameron
Date: Sat Apr 25 2026 - 14:37:44 EST
On Mon, 20 Apr 2026 13:12:22 +0300
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> wrote:
> Add support for the AD4880, a dual-channel 20-bit 40MSPS SAR ADC with
> integrated fully differential amplifiers (FDA).
>
> Architecture notes:
>
> The AD4880 is modeled as a single IIO device rather than two independent
> devices because the channels share power supplies, a voltage reference,
> the CNV conversion clock, and a single interleaved data output stream.
> Splitting them into separate IIO devices would make synchronized
> dual-channel capture impossible from userspace.
>
> An MFD approach does not apply here either - the channels are not
> functionally distinct sub-devices but identical ADC paths sharing a
> common data interface.
>
> Each channel has fully independent configuration registers accessible
> through separate SPI chip selects, so per-channel regmaps are used with
> no locking between them. The data path has no software involvement at
> runtime: the CNV clock triggers simultaneous conversions and the device
> outputs an interleaved bitstream captured directly by the IIO backend
> (FPGA). spi_new_ancillary_device() handles the configuration path;
> the IIO backend handles the data path.
>
> The debugfs_reg_access callback is not exposed for the dual-channel
> variant since the IIO framework provides a single (reg, val) interface
> with no channel parameter, and exposing only one channel would be
> misleading.
>
> The AD4880 is a fairly unique part - having separate SPI config
> interfaces per channel with a shared interleaved data output is not
> a common pattern.
>
> NOTE: The AD4880 driver has a cross-tree dependency on two SPI patches
> that are queued in spi/for-7.1:
>
> - ffef4123043c ("spi: allow ancillary devices to share parent's chip selects")
> - 463279e58811 ("spi: add devm_spi_new_ancillary_device()")
>
Applied to the testing branch of iio.git - char-misc pull requests were picked
up so I've rebased on top of that and the SPI patches are therefore available.
I'll rebase again on rc1 once available then push out as togreg for linux-next
to pick up.
thanks,
Jonathan
> Changes in v9:
> - Rebase on jic23/togreg
> - Add Conor's ack on dt-bindings patch
>
> Antoniu Miclaus (3):
> iio: backend: add devm_iio_backend_get_by_index()
> dt-bindings: iio: adc: ad4080: add AD4880 support
> iio: adc: ad4080: add support for AD4880 dual-channel ADC
>
> .../bindings/iio/adc/adi,ad4080.yaml | 53 +++-
> drivers/iio/adc/ad4080.c | 257 +++++++++++++-----
> drivers/iio/industrialio-backend.c | 53 +++-
> include/linux/iio/backend.h | 1 +
> 4 files changed, 285 insertions(+), 79 deletions(-)
>
>
> base-commit: d2a4ec19d2a2e54c23b5180e939994d3da4a6b91