Skip to content

Commit 91aa70b

Browse files
committed
iio: adc: at91-sama5d2_adc: ack DRDY irq in direct mode
Need to acknowledge DRDY irq in direct mode/ software triggered mode. Otherwise, on the next conversion, overrun flag will be raised, which is not a correct state. This doesn't affect the functionality, but will generate possible incorrect overrun reports. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 80315a5 commit 91aa70b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/iio/adc/at91-sama5d2_adc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,9 @@ static int at91_adc_read_raw(struct iio_dev *indio_dev,
786786
at91_adc_writel(st, AT91_SAMA5D2_IDR, BIT(chan->channel));
787787
at91_adc_writel(st, AT91_SAMA5D2_CHDR, BIT(chan->channel));
788788

789+
/* Needed to ACK the DRDY interruption */
790+
at91_adc_readl(st, AT91_SAMA5D2_LCDR);
791+
789792
mutex_unlock(&st->lock);
790793

791794
iio_device_release_direct_mode(indio_dev);

0 commit comments

Comments
 (0)