public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH omap-fixes] OMAP2/3: GPIO: remove recursion in IRQ wakeup path
Date: Wed, 4 Feb 2009 12:02:15 -0800	[thread overview]
Message-ID: <20090204200213.GO7215@atomide.com> (raw)
In-Reply-To: <87bptkenha.fsf@deeprootsystems.com>

* Kevin Hilman <khilman@deeprootsystems.com> [090202 09:53]:
> Kevin Hilman <khilman@deeprootsystems.com> writes:
> 
> > Now that the generic IRQ and GPIO frameworks are used for enabling and
> > disabling GPIO IRQ wakeup sources, there is no longer a need to call
> > [enable|disable]_irq_wake() in the low-level code.  Doing so results
> > in recursive calls to [enable|disable]_irq_wake().
> >
> > This was discovered in the suspend/resume path on OMAP3/Beagle using
> > the gpio-keys driver which disables/re-enables GPIO IRQ wakeups in the
> > suspend/resume path.
> >
> > Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> 
> Tony,
> 
> Not sure if it's too late, but this could go into omap-fixes too.

I'll add it after the previous omap-fixes are merged to the mainline.

Tony



> 
> Kevin
> 
> 
> > ---
> >  arch/arm/plat-omap/gpio.c |   14 ++++----------
> >  1 files changed, 4 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> > index f856a90..798a8cd 100644
> > --- a/arch/arm/plat-omap/gpio.c
> > +++ b/arch/arm/plat-omap/gpio.c
> > @@ -837,13 +837,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
> >  	case METHOD_MPUIO:
> >  	case METHOD_GPIO_1610:
> >  		spin_lock_irqsave(&bank->lock, flags);
> > -		if (enable) {
> > +		if (enable)
> >  			bank->suspend_wakeup |= (1 << gpio);
> > -			enable_irq_wake(bank->irq);
> > -		} else {
> > -			disable_irq_wake(bank->irq);
> > +		else
> >  			bank->suspend_wakeup &= ~(1 << gpio);
> > -		}
> >  		spin_unlock_irqrestore(&bank->lock, flags);
> >  		return 0;
> >  #endif
> > @@ -856,13 +853,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
> >  			return -EINVAL;
> >  		}
> >  		spin_lock_irqsave(&bank->lock, flags);
> > -		if (enable) {
> > +		if (enable)
> >  			bank->suspend_wakeup |= (1 << gpio);
> > -			enable_irq_wake(bank->irq);
> > -		} else {
> > -			disable_irq_wake(bank->irq);
> > +		else
> >  			bank->suspend_wakeup &= ~(1 << gpio);
> > -		}
> >  		spin_unlock_irqrestore(&bank->lock, flags);
> >  		return 0;
> >  #endif
> > -- 
> > 1.6.1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-02-04 20:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 18:35 [PATCH omap-fixes] OMAP2/3: GPIO: remove recursion in IRQ wakeup path Kevin Hilman
2009-02-02 17:51 ` Kevin Hilman
2009-02-04 20:02   ` Tony Lindgren [this message]
2009-02-09  4:39 ` David Brownell
2009-02-11  0:18   ` Kevin Hilman
2009-02-20 19:46     ` Tony Lindgren
2009-02-20 21:21       ` Kevin Hilman

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=20090204200213.GO7215@atomide.com \
    --to=tony@atomide.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@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