aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2012-05-17 19:42:16 -0400
committerKevin Hilman <khilman@ti.com>2012-05-18 10:05:06 -0400
commitb3c64bc30af67ed328a8d919e41160942b870451 (patch)
treececade8bda2dcfd45cb05d1d3bd7f89db677ded6 /drivers/gpio
parent22770de11cb13e7120f973bca6c800de371a6717 (diff)
gpio/omap: (re)fix wakeups on level-triggered GPIOs
commit 1b1287032 (gpio/omap: fix missing check in *_runtime_suspend()) broke wakeups on level-triggered GPIOs by adding the enabled non-wakeup GPIO check before the workaround that enables wakeups on level-triggered IRQs, effectively disabling that workaround. To fix, move the enabled non-wakeup GPIO check after the level-triggered IRQ workaround. Reported-by: Tony Lindgren <tony@atomide.com> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Tested-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index b570a6aae6e6..c4ed1722734c 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1157,9 +1157,6 @@ static int omap_gpio_runtime_suspend(struct device *dev)
1157 1157
1158 spin_lock_irqsave(&bank->lock, flags); 1158 spin_lock_irqsave(&bank->lock, flags);
1159 1159
1160 if (!bank->enabled_non_wakeup_gpios)
1161 goto update_gpio_context_count;
1162
1163 /* 1160 /*
1164 * Only edges can generate a wakeup event to the PRCM. 1161 * Only edges can generate a wakeup event to the PRCM.
1165 * 1162 *
@@ -1180,6 +1177,9 @@ static int omap_gpio_runtime_suspend(struct device *dev)
1180 __raw_writel(wake_hi | bank->context.risingdetect, 1177 __raw_writel(wake_hi | bank->context.risingdetect,
1181 bank->base + bank->regs->risingdetect); 1178 bank->base + bank->regs->risingdetect);
1182 1179
1180 if (!bank->enabled_non_wakeup_gpios)
1181 goto update_gpio_context_count;
1182
1183 if (bank->power_mode != OFF_MODE) { 1183 if (bank->power_mode != OFF_MODE) {
1184 bank->power_mode = 0; 1184 bank->power_mode = 0;
1185 goto update_gpio_context_count; 1185 goto update_gpio_context_count;