From: eduardo.valentin@nokia.com (Eduardo Valentin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip
Date: Wed, 5 Jan 2011 21:24:25 +0200 [thread overview]
Message-ID: <20110105192425.GA24729@besouro.research.nokia.com> (raw)
In-Reply-To: <20110105181918.GB8717@n2100.arm.linux.org.uk>
Hello Russell,
On Wed, Jan 05, 2011 at 06:19:18PM +0000, Russell King wrote:
> On Wed, Jan 05, 2011 at 07:58:03PM +0200, Eduardo Valentin wrote:
> > Currently, if one calls disable_irq(gpio_irq), the irq
> > won't get disabled.
> >
> > This is happening because the omap gpio code defines only
> > a .mask callback. And the default_disable function is just
> > a stub. The result is that, when someone calls disable_irq
> > for an irq in a gpio line, it will be kept enabled.
> >
> > This patch solves this issue by setting the .disable
> > callback to point to the same .mask callback.
>
> Amd this is a problem because?
errr.. because the interrupt is enabled when it was supposed to be disabled?
>
> The way this works is that although it isn't disabled at that point,
> if it never triggers, then everything remains happy. However, if it
> does trigger, the genirq code will then mask the interrupt and won't
> call the handler.
Right.. I didn't see from this point. I will check how that gets unmasked.
But even so, if I understood correctly what you described, it would still
open a time window which the system would see at least 1 interrupt during
the time it was not suppose to. And that can wakeup a system which is in
deep sleep mode, either via dynamic idle or static suspend.
It is unlikely, I know. But it can still happen. And can be avoided.
Regards,
--
Eduardo Valentin
next prev parent reply other threads:[~2011-01-05 19:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 17:58 [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip Eduardo Valentin
2011-01-05 18:19 ` Russell King - ARM Linux
2011-01-05 19:24 ` Eduardo Valentin [this message]
2011-01-05 20:29 ` Russell King - ARM Linux
2011-01-07 9:00 ` David Brownell
2011-01-05 23:22 ` Kevin Hilman
2011-01-06 6:24 ` Eduardo Valentin
2011-01-06 17:59 ` Kevin Hilman
2011-01-07 9:56 ` Eduardo Valentin
2011-01-07 10:11 ` Russell King - ARM Linux
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=20110105192425.GA24729@besouro.research.nokia.com \
--to=eduardo.valentin@nokia.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).