Re: [PATCH 2/2] iio: adc: ad4080: add support for AD4880 dual-channel ADC
From: Andy Shevchenko
Date: Thu Jan 29 2026 - 10:57:35 EST
On Thu, Jan 29, 2026 at 05:27:30PM +0200, Antoniu Miclaus wrote:
> Add support for the AD4880, a dual-channel 20-bit 40MSPS SAR ADC with
> integrated fully differential amplifiers (FDA).
>
> The AD4880 has two independent ADC channels, each with its own SPI
> configuration interface. The driver uses spi_new_ancillary_device() to
> create an additional SPI device for the second channel, allowing both
> channels to share the same SPI bus with different chip selects.
> Key changes:
> - Add AD4880 chip info with 2 channels
> - Extend state structure to support arrays of regmaps and backends
> - Refactor setup into per-channel function
> - Add adi,aux-spi-cs property for secondary channel chip select
> - Add channel index parameter to channel macro for scan_index support
> - Make all IIO attributes per-channel (filter_type, oversampling_ratio,
> sampling_frequency) for independent channel configuration
Can something be split as prerequisite?
Overall, making
struct regmap *map = ...->...[ch];
will help to make many lines of code easier to read.
--
With Best Regards,
Andy Shevchenko