[RESEND PATCH 06/14] iio: adc: at91-sama5d2: poll own trigger on data ready interrupt
From: Jonathan Cameron
Date: Sun Nov 08 2026 - 23:33:50 EST
From: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
Poll st->trig from the data ready interrupt path rather than
indio->trig. The data ready interrupt is only enabled for the triggered
buffer when DMA is not in use and the device's own trigger is in use,
see at91_adc_buffer_check_use_irq().
The DMA completion callback still polls indio_dev->trig as it must run
the pollfunc on whichever trigger the device is using.
This removes one dependency on the trig field of struct iio_dev, which
is to become private to the IIO core.
Signed-off-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
---
drivers/iio/adc/at91-sama5d2_adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
index dba4e7b2e77b..e4db74fa1360 100644
--- a/drivers/iio/adc/at91-sama5d2_adc.c
+++ b/drivers/iio/adc/at91-sama5d2_adc.c
@@ -1711,7 +1711,7 @@ static irqreturn_t at91_adc_interrupt(int irq, void *private)
(status & AT91_SAMA5D2_IER_DRDY)) {
/* triggered buffer without DMA */
disable_irq_nosync(irq);
- iio_trigger_poll(indio->trig);
+ iio_trigger_poll(st->trig);
} else if (iio_buffer_enabled(indio) && st->dma_st.dma_chan) {
/* triggered buffer with DMA - should not happen */
disable_irq_nosync(irq);
--
2.56.0