From: Eugen Hristev <eugen.hristev@microchip.com>
To: nicolas.ferre@microchip.com,
alexandre.belloni@free-electrons.com, linux-iio@vger.kernel.org,
lars@metafoo.de, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
ludovic.desroches@microchip.com, jic23@kernel.org
Cc: eugen.hristev@microchip.com
Subject: [PATCH v2 4/5] iio: adc: at91-sama5d2_adc: ack DRDY irq in direct mode
Date: Wed, 11 Oct 2017 09:35:31 +0300 [thread overview]
Message-ID: <1507703732-29175-5-git-send-email-eugen.hristev@microchip.com> (raw)
In-Reply-To: <1507703732-29175-1-git-send-email-eugen.hristev@microchip.com>
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>
---
drivers/iio/adc/at91-sama5d2_adc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
index 7a9305a..7e51ecb 100644
--- a/drivers/iio/adc/at91-sama5d2_adc.c
+++ b/drivers/iio/adc/at91-sama5d2_adc.c
@@ -773,6 +773,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);
--
2.7.4
next prev parent reply other threads:[~2017-10-11 6:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 6:35 [PATCH v2 0/5] iio: adc: at91-sama5d2_adc: add DMA support Eugen Hristev
[not found] ` <1507703732-29175-1-git-send-email-eugen.hristev-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>
2017-10-11 6:35 ` [PATCH v2 1/5] dt-bindings: iio: at91-sama5d2_adc: add optional dma property Eugen Hristev
2017-10-13 21:51 ` Rob Herring
2017-10-19 11:14 ` Alexandre Belloni
[not found] ` <20171019111417.7rzdnkvtukzzhl2u-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-10-19 21:58 ` Rob Herring
[not found] ` <CAL_JsqLPMeF9EtcCO3eZn+7DbyAQcxzNYEpAiFvQoe1=ytpELQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-07 8:49 ` Eugen Hristev
2017-11-07 9:02 ` Ludovic Desroches
2017-10-11 6:35 ` [PATCH v2 2/5] ARM: dts: at91: sama5d2: added dma property for ADC device Eugen Hristev
2017-10-11 6:35 ` [PATCH v2 3/5] iio: adc: at91-sama5d2_adc: add support for DMA Eugen Hristev
[not found] ` <1507703732-29175-4-git-send-email-eugen.hristev-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>
2017-10-15 10:16 ` Jonathan Cameron
2017-10-11 6:35 ` Eugen Hristev [this message]
2017-10-11 6:35 ` [PATCH v2 5/5] iio: adc: at91-sama5d2_adc: use max sample rate Eugen Hristev
[not found] ` <1507703732-29175-6-git-send-email-eugen.hristev-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>
2017-10-15 10:28 ` Jonathan Cameron
2017-10-18 8:49 ` Eugen Hristev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507703732-29175-5-git-send-email-eugen.hristev@microchip.com \
--to=eugen.hristev@microchip.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).