diff options
author | Eugen Hristev <eugen.hristev@microchip.com> | 2017-11-15 13:56:48 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-12-02 11:39:44 +0100 |
commit | 10c7a314c9fde2342407c1bd2d71d0c0f7ff9662 (patch) | |
tree | 29afa6dde4961703d7c57820c71af1001f742339 /drivers | |
parent | iio: adc: at91-sama5d2_adc: add support for DMA (diff) | |
download | linux-10c7a314c9fde2342407c1bd2d71d0c0f7ff9662.tar.xz linux-10c7a314c9fde2342407c1bd2d71d0c0f7ff9662.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/at91-sama5d2_adc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c index 99f3c2c89768..4eff8351ce29 100644 --- a/drivers/iio/adc/at91-sama5d2_adc.c +++ b/drivers/iio/adc/at91-sama5d2_adc.c @@ -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); |