aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/gpio.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-04-23 14:10:49 -0400
committerTony Lindgren <tony@atomide.com>2009-04-23 14:10:49 -0400
commitb3bb4f688c225d9455bbd59e98f634f98c1074d0 (patch)
treec5ee29d52785791fbba001dbe65e65f524fb3619 /arch/arm/plat-omap/gpio.c
parentd94a2eddf50c4aa1553acf3025f45d03704a1f97 (diff)
ARM: OMAP2/3: GPIO: do not attempt to wake-enable
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> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/gpio.c')
-rw-r--r--arch/arm/plat-omap/gpio.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index d3fa41e3d8c5..210a1c045554 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -921,13 +921,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
921 case METHOD_MPUIO: 921 case METHOD_MPUIO:
922 case METHOD_GPIO_1610: 922 case METHOD_GPIO_1610:
923 spin_lock_irqsave(&bank->lock, flags); 923 spin_lock_irqsave(&bank->lock, flags);
924 if (enable) { 924 if (enable)
925 bank->suspend_wakeup |= (1 << gpio); 925 bank->suspend_wakeup |= (1 << gpio);
926 enable_irq_wake(bank->irq); 926 else
927 } else {
928 disable_irq_wake(bank->irq);
929 bank->suspend_wakeup &= ~(1 << gpio); 927 bank->suspend_wakeup &= ~(1 << gpio);
930 }
931 spin_unlock_irqrestore(&bank->lock, flags); 928 spin_unlock_irqrestore(&bank->lock, flags);
932 return 0; 929 return 0;
933#endif 930#endif
@@ -940,13 +937,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
940 return -EINVAL; 937 return -EINVAL;
941 } 938 }
942 spin_lock_irqsave(&bank->lock, flags); 939 spin_lock_irqsave(&bank->lock, flags);
943 if (enable) { 940 if (enable)
944 bank->suspend_wakeup |= (1 << gpio); 941 bank->suspend_wakeup |= (1 << gpio);
945 enable_irq_wake(bank->irq); 942 else
946 } else {
947 disable_irq_wake(bank->irq);
948 bank->suspend_wakeup &= ~(1 << gpio); 943 bank->suspend_wakeup &= ~(1 << gpio);
949 }
950 spin_unlock_irqrestore(&bank->lock, flags); 944 spin_unlock_irqrestore(&bank->lock, flags);
951 return 0; 945 return 0;
952#endif 946#endif