linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable GPIO bank IRQ
@ 2009-03-09 22:14 Kevin Hilman
  2009-03-18 22:07 ` [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Hilman @ 2009-03-09 22:14 UTC (permalink / raw)
  To: linux-omap

The GPIO IRQ enable/disable path attempts to also enable IRQ wake
support for the parent GPIO bank IRQ as well.  However, since there is
no 'set_wake' hook for the bank IRQs, these calls will always fail.
Also, since the enable will fail on the suspend path, the disable on
the resume path will trigger unbalanced enable/disable warnings.

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>
---
This patch was sent on 28 jan 2009 as:
[PATCH omap-fixes] OMAP2/3: GPIO: remove recursion in IRQ wakeup path

This version simply updates the description to better describe the problem
and solution.

 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.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable
  2009-03-09 22:14 [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable GPIO bank IRQ Kevin Hilman
@ 2009-03-18 22:07 ` Tony Lindgren
  2009-03-19 16:43   ` Kevin Hilman
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2009-03-18 22:07 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Commit: 2ac496a208895c925aec1774a873b5b096b2d3f0

PatchWorks
http://patchwork.kernel.org/patch/10719/

Git
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=2ac496a208895c925aec1774a873b5b096b2d3f0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable
  2009-03-18 22:07 ` [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable Tony Lindgren
@ 2009-03-19 16:43   ` Kevin Hilman
  2009-03-19 16:53     ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Hilman @ 2009-03-19 16:43 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap

Tony Lindgren <tony@atomide.com> writes:

> This patch has been applied to the linux-omap
> by youw fwiendly patch wobot.
>
> Commit: 2ac496a208895c925aec1774a873b5b096b2d3f0
>
> PatchWorks
> http://patchwork.kernel.org/patch/10719/
>
> Git
> http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=2ac496a208895c925aec1774a873b5b096b2d3f0

Tony, 

$SUBJECT on this commit seems to have been a bit mangled leaving
a not very clear commit log/history.

Kevin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable
  2009-03-19 16:53     ` Tony Lindgren
@ 2009-03-19 16:48       ` Felipe Balbi
  2009-03-19 17:16       ` Tony Lindgren
  1 sibling, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2009-03-19 16:48 UTC (permalink / raw)
  To: ext Tony Lindgren; +Cc: Kevin Hilman, linux-omap

On Thu, Mar 19, 2009 at 05:53:35PM +0100, Tony Lindgren wrote:
> * Kevin Hilman <khilman@deeprootsystems.com> [090319 09:44]:
> > Tony Lindgren <tony@atomide.com> writes:
> > 
> > > This patch has been applied to the linux-omap
> > > by youw fwiendly patch wobot.
> > >
> > > Commit: 2ac496a208895c925aec1774a873b5b096b2d3f0
> > >
> > > PatchWorks
> > > http://patchwork.kernel.org/patch/10719/
> > >
> > > Git
> > > http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=2ac496a208895c925aec1774a873b5b096b2d3f0
> > 
> > Tony, 
> > 
> > $SUBJECT on this commit seems to have been a bit mangled leaving
> > a not very clear commit log/history.
> 
> Heh looks like bad html parsing :) I'll revert and re-apply.

why do you even try to parse the html ?? patchworks hold it in mbox
format:

http://patchwork.kernel.org/patch/10719/mbox/

-- 
balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable
  2009-03-19 16:43   ` Kevin Hilman
@ 2009-03-19 16:53     ` Tony Lindgren
  2009-03-19 16:48       ` Felipe Balbi
  2009-03-19 17:16       ` Tony Lindgren
  0 siblings, 2 replies; 7+ messages in thread
From: Tony Lindgren @ 2009-03-19 16:53 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap

* Kevin Hilman <khilman@deeprootsystems.com> [090319 09:44]:
> Tony Lindgren <tony@atomide.com> writes:
> 
> > This patch has been applied to the linux-omap
> > by youw fwiendly patch wobot.
> >
> > Commit: 2ac496a208895c925aec1774a873b5b096b2d3f0
> >
> > PatchWorks
> > http://patchwork.kernel.org/patch/10719/
> >
> > Git
> > http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=2ac496a208895c925aec1774a873b5b096b2d3f0
> 
> Tony, 
> 
> $SUBJECT on this commit seems to have been a bit mangled leaving
> a not very clear commit log/history.

Heh looks like bad html parsing :) I'll revert and re-apply.

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable
  2009-03-19 16:53     ` Tony Lindgren
  2009-03-19 16:48       ` Felipe Balbi
@ 2009-03-19 17:16       ` Tony Lindgren
  2009-03-19 17:27         ` Felipe Balbi
  1 sibling, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2009-03-19 17:16 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap

* Tony Lindgren <tony@atomide.com> [090319 09:54]:
> * Kevin Hilman <khilman@deeprootsystems.com> [090319 09:44]:
> > Tony Lindgren <tony@atomide.com> writes:
> > 
> > > This patch has been applied to the linux-omap
> > > by youw fwiendly patch wobot.
> > >
> > > Commit: 2ac496a208895c925aec1774a873b5b096b2d3f0
> > >
> > > PatchWorks
> > > http://patchwork.kernel.org/patch/10719/
> > >
> > > Git
> > > http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=2ac496a208895c925aec1774a873b5b096b2d3f0
> > 
> > Tony, 
> > 
> > $SUBJECT on this commit seems to have been a bit mangled leaving
> > a not very clear commit log/history.
> 
> Heh looks like bad html parsing :) I'll revert and re-apply.

Seems like a bug in pwclient..

$ pwclient get 10719

Shows the subject in the patch as:

Subject: [omap-fixes,
        v2] OMAP2/3: GPIO: do not attempt to wake-enable GPIO bank IRQ

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable
  2009-03-19 17:16       ` Tony Lindgren
@ 2009-03-19 17:27         ` Felipe Balbi
  0 siblings, 0 replies; 7+ messages in thread
From: Felipe Balbi @ 2009-03-19 17:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Kevin Hilman, linux-omap

On Thu, Mar 19, 2009 at 10:16:33AM -0700, Tony Lindgren wrote:
> Seems like a bug in pwclient..
> 
> $ pwclient get 10719
> 
> Shows the subject in the patch as:
> 
> Subject: [omap-fixes,
>         v2] OMAP2/3: GPIO: do not attempt to wake-enable GPIO bank IRQ

$ curl http://patchwork.kernel.org/patch/10719/mbox | git am -s

would do the trick :-p

-- 
balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-19 17:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 22:14 [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable GPIO bank IRQ Kevin Hilman
2009-03-18 22:07 ` [APPLIED] [PATCH omap-fixes v2] OMAP2/3: GPIO: do not attempt to wake-enable Tony Lindgren
2009-03-19 16:43   ` Kevin Hilman
2009-03-19 16:53     ` Tony Lindgren
2009-03-19 16:48       ` Felipe Balbi
2009-03-19 17:16       ` Tony Lindgren
2009-03-19 17:27         ` Felipe Balbi

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).