RE: [PATCH v6 4/4] iio: adc: ad4691: add SPI offload support

From: Sabau, Radu bogdan

Date: Mon Apr 06 2026 - 10:17:43 EST




> -----Original Message-----
> From: David Lechner <dlechner@xxxxxxxxxxxx>
> Sent: Monday, April 6, 2026 4:44 PM

...

> >
> > This is bad documentation on my part. "channel byte" isn't used anymore,
> > this is previous version behaviour. Right now, only 16-bits worth of actual
> > channel data are used.
> >
> Then why do we need the shift if there is no other data? Can't we rework
> the SPI message so that there is no shift?

I thought the shift is needed since DMA size is 32 bits, and value comes on the
upper word 16 bits, not on the lower ones as for CNV Burst.

Manual Mode layout: TX [CMD_HI CMD_LO DUMMY DUMMY], RX [DATA_HI DATA_LO DUMMY DUMMY]
CNV Burst layout: TX [REG_HI REG_LO DUMMY DUMMY], RX [DUMMY DUMMY DATA_HI DATA_LO]