diff mbox

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

Message ID 1236636860-2804-1-git-send-email-khilman@deeprootsystems.com (mailing list archive)
State Accepted
Commit 2ac496a208895c925aec1774a873b5b096b2d3f0
Headers show

Commit Message

Kevin Hilman March 9, 2009, 10:14 p.m. UTC
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(-)

Comments

Tony Lindgren March 18, 2009, 10:07 p.m. UTC | #1
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


--
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
Kevin Hilman March 19, 2009, 4:43 p.m. UTC | #2
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
--
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
Felipe Balbi March 19, 2009, 4:48 p.m. UTC | #3
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/
Tony Lindgren March 19, 2009, 4:53 p.m. UTC | #4
* 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
--
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
Tony Lindgren March 19, 2009, 5:16 p.m. UTC | #5
* 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
--
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
Felipe Balbi March 19, 2009, 5:27 p.m. UTC | #6
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
diff mbox

Patch

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