From: Masahiro Honda <honda@mechatrax.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Masahiro Honda <honda@mechatrax.com>
Subject: [PATCH] Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag
Date: Mon, 6 Mar 2023 13:47:37 +0900 [thread overview]
Message-ID: <20230306044737.862-1-honda@mechatrax.com> (raw)
ADC using ad7793.ko, such as AD7794, may read incorrect data.
Extra interrupt is pending if the data on DOUT contains a falling edge.
Therefore, wait_for_completion_timeout returns immediately.
This patch fixes the issue by setting IRQ_DISABLE_UNLAZY flag.
Signed-off-by: Masahiro Honda <honda@mechatrax.com>
---
drivers/iio/adc/ad_sigma_delta.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index d8570f620..364051809 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -584,6 +584,7 @@ static int devm_ad_sd_probe_trigger(struct device *dev, struct iio_dev *indio_de
init_completion(&sigma_delta->completion);
sigma_delta->irq_dis = true;
+ irq_set_status_flags(sigma_delta->spi->irq, IRQ_DISABLE_UNLAZY);
ret = devm_request_irq(dev, sigma_delta->spi->irq,
ad_sd_data_rdy_trig_poll,
sigma_delta->info->irq_flags | IRQF_NO_AUTOEN,
--
2.34.1
next reply other threads:[~2023-03-06 4:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 4:47 Masahiro Honda [this message]
2023-03-06 13:32 ` [PATCH] Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag Nuno Sá
2023-03-07 10:54 ` Masahiro Honda
2023-03-27 9:01 ` Masahiro Honda
2023-03-27 12:28 ` Nuno Sá
2023-03-28 10:55 ` Masahiro Honda
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=20230306044737.862-1-honda@mechatrax.com \
--to=honda@mechatrax.com \
--cc=Michael.Hennerich@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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