From: Shawn Guo <shawn.guo@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Robin van der Gracht <robin@protonic.nl>,
Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Sascha Hauer <kernel@pengutronix.de>,
Alexandre Courbot <gnurou@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
David Jander <david@protonic.nl>, Marek Vasut <marex@denx.de>
Subject: Re: [PATCH] gpio: mxs: Use PIN2IRQ register to mask interrupts
Date: Tue, 13 Jan 2015 22:21:59 +0800 [thread overview]
Message-ID: <20150113142156.GD19355@dragon> (raw)
In-Reply-To: <CACRpkdaqPVED6U6mYWEzfrbtoYdfmdGZ34jjmokMp_KfOCZnaQ@mail.gmail.com>
On Tue, Jan 13, 2015 at 07:34:31AM +0100, Linus Walleij wrote:
> On Mon, Dec 15, 2014 at 11:28 AM, Robin van der Gracht
> <robin@protonic.nl> wrote:
>
> > The PIN2IRQ register should be used to mask an interrupt. Clearing a
No, PIN2IRQ implements a function select, not a mask.
> > bit in the IRQEN register only prevents the interrupt from propagating but
> > still allows hardware to set the status bit when triggered.
Isn't it what a mask implementation supposed to do?
> > So when
> > unmasking the interrupt, it will immediately re-trigger if an interrupt
> > condition occurred during masking.
Per my understanding, this is the correct behavior. If you do not want
that interrupt triggering, you should clear the interrupt status before
unmasking the interrupt.
Shawn
> >
> > This is unwanted behavior especially when using level triggered
> > interrupts. In this case every interrupt triggers twice. If the
> > interrupt is handled in the handler, the second interrupt will be
> > the first one to be able to ack the interrupt.
> >
> > Signed-off-by: Robin van der Gracht <robin@protonic.nl>
>
> Apparently MXS is a popular GPIO controller without a real maintainer.
>
> Adding some random users to the To: line hoping we get some
> review of this patch.
>
> Yours,
> Linus Walleij
prev parent reply other threads:[~2015-01-13 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 10:28 [PATCH] gpio: mxs: Use PIN2IRQ register to mask interrupts Robin van der Gracht
2015-01-13 6:34 ` Linus Walleij
2015-01-13 14:21 ` Shawn Guo [this message]
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=20150113142156.GD19355@dragon \
--to=shawn.guo@linaro.org \
--cc=david@protonic.nl \
--cc=gnurou@gmail.com \
--cc=gwenhael.goavec-merou@armadeus.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marex@denx.de \
--cc=maxime.ripard@free-electrons.com \
--cc=robin@protonic.nl \
/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).