linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	"tiantao (H)" <tiantao6@hisilicon.com>
Subject: Re: [PATCH 4/7] iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead of request then disable
Date: Mon, 5 Apr 2021 15:35:02 +0100	[thread overview]
Message-ID: <20210405153502.772d13ac@jic23-huawei> (raw)
In-Reply-To: <7df210b8251c4c118e6c0b9fe6505b61@hisilicon.com>

On Fri, 2 Apr 2021 20:13:00 +0000
"Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com> wrote:

> > -----Original Message-----
> > From: Jonathan Cameron [mailto:jic23@kernel.org]
> > Sent: Saturday, April 3, 2021 7:46 AM
> > To: linux-iio@vger.kernel.org
> > Cc: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>; Jonathan Cameron
> > <jonathan.cameron@huawei.com>; Maxime Ripard <maxime.ripard@bootlin.com>
> > Subject: [PATCH 4/7] iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead
> > of request then disable
> > 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This new flag ensures a requested irq is not autoenabled, thus removing
> > the need for the disable_irq() that follows and closing off any chance
> > of spurious interrupts.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > ---  
> 
> Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>

Applied to the togreg branch of iio.git and pushed out as testing
to let 0-day poke at it.   Other feedback whilst it's doing that
most welcome.

Thanks,

Jonathan

> 
> >  drivers/iio/adc/sun4i-gpadc-iio.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c
> > b/drivers/iio/adc/sun4i-gpadc-iio.c
> > index 99b43f28e879..2d393a4dfff6 100644
> > --- a/drivers/iio/adc/sun4i-gpadc-iio.c
> > +++ b/drivers/iio/adc/sun4i-gpadc-iio.c
> > @@ -470,7 +470,8 @@ static int sun4i_irq_init(struct platform_device *pdev,
> > const char *name,
> >  	}
> > 
> >  	*irq = ret;
> > -	ret = devm_request_any_context_irq(&pdev->dev, *irq, handler, 0,
> > +	ret = devm_request_any_context_irq(&pdev->dev, *irq, handler,
> > +					   IRQF_NO_AUTOEN,
> >  					   devname, info);
> >  	if (ret < 0) {
> >  		dev_err(&pdev->dev, "could not request %s interrupt: %d\n",
> > @@ -478,7 +479,6 @@ static int sun4i_irq_init(struct platform_device *pdev,
> > const char *name,
> >  		return ret;
> >  	}
> > 
> > -	disable_irq(*irq);
> >  	atomic_set(atomic, 0);
> > 
> >  	return 0;
> > --
> > 2.31.1  
> 


  reply	other threads:[~2021-04-05 14:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 18:45 [PATCH 0/7] iio: Use IRQF_NO_AUTOEN Jonathan Cameron
2021-04-02 18:45 ` [PATCH 1/7] iio:adc:ad7766: Use new IRQF_NO_AUTOEN to reduce boilerplate Jonathan Cameron
2021-04-02 20:10   ` Song Bao Hua (Barry Song)
2021-04-05 14:27     ` Jonathan Cameron
2021-04-02 18:45 ` [PATCH 2/7] iio:adc:exynos-adc: Use new IRQF_NO_AUTOEN flag rather than separate irq_disable() Jonathan Cameron
2021-04-02 20:11   ` Song Bao Hua (Barry Song)
2021-04-04 19:20   ` Krzysztof Kozlowski
2021-04-05 14:29     ` Jonathan Cameron
2021-04-02 18:45 ` [PATCH 3/7] iio:adc:nau7802: Use IRQF_NO_AUTOEN instead of request then disable Jonathan Cameron
2021-04-02 20:12   ` Song Bao Hua (Barry Song)
2021-04-05 14:33     ` Jonathan Cameron
2021-04-02 18:45 ` [PATCH 4/7] iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag " Jonathan Cameron
2021-04-02 20:13   ` Song Bao Hua (Barry Song)
2021-04-05 14:35     ` Jonathan Cameron [this message]
2021-04-02 18:45 ` [PATCH 5/7] iio:chemical:scd30: Use IRQF_NO_AUTOEN to avoid irq " Jonathan Cameron
2021-04-02 20:14   ` Song Bao Hua (Barry Song)
2021-04-05 14:36     ` Jonathan Cameron
2021-04-02 18:45 ` [PATCH 6/7] iio:imu:adis: Use IRQF_NO_AUTOEN instead of " Jonathan Cameron
2021-04-02 20:37   ` Song Bao Hua (Barry Song)
2021-04-05 14:40     ` Jonathan Cameron
2021-04-06 11:48       ` Sa, Nuno
2021-04-02 18:45 ` [PATCH 7/7] iio:adc:ad_sigma_delta: Use IRQF_NO_AUTOEN rather than request and disable Jonathan Cameron
2021-04-02 20:30   ` Song Bao Hua (Barry Song)
2021-04-05 14:51     ` Jonathan Cameron
2021-04-05 22:56       ` Song Bao Hua (Barry Song)
2021-04-02 19:00 ` [PATCH 0/7] iio: Use IRQF_NO_AUTOEN Andy Shevchenko
2021-04-03 11:45 ` Lars-Peter Clausen

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=20210405153502.772d13ac@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=song.bao.hua@hisilicon.com \
    --cc=tiantao6@hisilicon.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).