Re: [PATCH] iio: adc: ad4080: allow debugfs register access to both channels
From: Jonathan Cameron
Date: Sun Aug 30 2026 - 19:53:33 EST
On Wed, 26 Aug 2026 14:16:13 +0300
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> wrote:
> The dual-channel parts (AD4880/AD4883/AD4884) are built from two
> independent ADC dies, each with its own SPI chip select and register
> map. They are presented as a single IIO device because the FPGA
> interleaves both dies into one DMA stream, so only one direct_reg_access
> debugfs file is created and it can only reach channel A's regmap. Channel
> B's registers are therefore inaccessible, which blocks bring-up and
> debugging of the second die.
>
> Select the target die through the debugfs register address: the low 8
> bits are the register offset and the upper bits are the channel index
> (0x0nn selects channel A, 0x1nn channel B). A read returns the real
> register value of the selected die and each die is addressed
> independently; single-channel parts only accept channel 0.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
Applied to the testing branch of iio.git
thanks,
Jonathan