From: Lars-Peter Clausen <lars@metafoo.de>
To: Frank Li <Frank.Li@nxp.com>, Cai Huoqing <cai.huoqing@linux.dev>,
Haibo Chen <haibo.chen@nxp.com>,
Jonathan Cameron <jic23@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
"open list:NXP i.MX 8QXP ADC DRIVER" <linux-iio@vger.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>
Cc: imx@lists.linux.dev
Subject: Re: [PATCH 1/1] iio: imx8qxp-adc: fix irq flood when call imx8qxp_adc_read_raw()
Date: Tue, 29 Nov 2022 10:23:04 -0800 [thread overview]
Message-ID: <bbacb73a-6904-d196-ab4a-3e388bcab56c@metafoo.de> (raw)
In-Reply-To: <20221129164531.2164660-1-Frank.Li@nxp.com>
On 11/29/22 08:45, Frank Li wrote:
readl(adc->regs + IMX8QXP_ADR_ADC_FCTRL));
> @@ -272,6 +275,10 @@ static irqreturn_t imx8qxp_adc_isr(int irq, void *dev_id)
> if (fifo_count)
> complete(&adc->completion);
Shouldn't the completion be triggered after the reading of the samples?
otherwise you have a race condition on a multi-processor system.
>
> + for (i = 0; i < fifo_count; i++)
> + adc->fifo[i] = FIELD_GET(IMX8QXP_ADC_RESFIFO_VAL_MASK,
> + readl_relaxed(adc->regs + IMX8QXP_ADR_ADC_RESFIFO));
> +
> return IRQ_HANDLED;
> }
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-29 18:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 16:45 [PATCH 1/1] iio: imx8qxp-adc: fix irq flood when call imx8qxp_adc_read_raw() Frank Li
2022-11-29 16:45 ` Frank Li
2022-11-30 9:58 ` Bough Chen
2022-11-30 14:09 ` Frank Li
2022-11-29 18:23 ` Lars-Peter Clausen [this message]
2022-11-29 19:49 ` Frank Li
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=bbacb73a-6904-d196-ab4a-3e388bcab56c@metafoo.de \
--to=lars@metafoo.de \
--cc=Frank.Li@nxp.com \
--cc=cai.huoqing@linux.dev \
--cc=festevam@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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