Re: [PATCH v5 14/15] iio: adc: ad4134: Support high-speed data capture
From: Jonathan Cameron
Date: Sat Oct 17 2026 - 15:10:51 EST
On Fri, 16 Oct 2026 23:00:34 -0300
Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx> wrote:
> Make use of SPI transfer offloading to speed up data capture, enabling data
> acquisition at faster sample rates (up to 1.496 MSPS).
>
I'd call out here that in this mode, you can't uses the sysfs interfaces
to read channels. Even when offloading is involved, no access at all
is unusual. Is there a path to add that, if only for debug?
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> diff --git a/drivers/iio/adc/ad4134.c b/drivers/iio/adc/ad4134.c
> index 6b05e40f7aeb..21e8039b3411 100644
> --- a/drivers/iio/adc/ad4134.c
> +++ b/drivers/iio/adc/ad4134.c
> static irqreturn_t ad4134_trigger_handler(int irq, void *p)
> {
> IIO_DECLARE_BUFFER_WITH_TS(u32, channels, AD4134_NUM_CHANNELS) = { };
> @@ -520,6 +660,9 @@ static int ad4134_read_raw(struct iio_dev *indio_dev,
>
> switch (info) {
> case IIO_CHAN_INFO_RAW: {
> + if (!IS_ERR_OR_NULL(st->offload))
> + return -EPROTONOSUPPORT;
If direct access is not supported when offload is in play
then we shouldn't have an interface to get here (i.e. no
IIO_CHAN_INFO_RAW bit set in the info mask bitmaps.
As such is this just defensive coding?
If so add a comment to say that, or just drop it.
> +
> IIO_DEV_ACQUIRE_DIRECT_MODE(indio_dev, claim);
> if (IIO_DEV_ACQUIRE_FAILED(claim))
> return -EBUSY;