Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10c7a314 authored by Eugen Hristev's avatar Eugen Hristev Committed by Jonathan Cameron
Browse files

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: default avatarEugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 073c6620
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -786,6 +786,9 @@ static int at91_adc_read_raw(struct iio_dev *indio_dev,
		at91_adc_writel(st, AT91_SAMA5D2_IDR, BIT(chan->channel));
		at91_adc_writel(st, AT91_SAMA5D2_CHDR, BIT(chan->channel));

		/* Needed to ACK the DRDY interruption */
		at91_adc_readl(st, AT91_SAMA5D2_LCDR);

		mutex_unlock(&st->lock);

		iio_device_release_direct_mode(indio_dev);