aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-omap.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-08-29 09:11:08 -0400
committerTarun Kanti DebBarma <tarun.kanti@ti.com>2012-02-06 06:26:14 -0500
commitba805be53cb9112917631d368f859af5e20d695f (patch)
treecfcb6050d18f108b1c8cfad673ebf5ea70918f1c /drivers/gpio/gpio-omap.c
parentae547354a8ed59f19b57f7e1de9c7816edfc3537 (diff)
gpio/omap: enable irq at the end of all configuration in restore
Setup the interrupt enable registers only after we have configured the required edge and required configurations, not before, to prevent spurious events as part of restore routine. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r--drivers/gpio/gpio-omap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index f6b2c51b2935..41265e823b23 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1352,10 +1352,6 @@ void omap2_gpio_resume_after_idle(void)
1352#if defined(CONFIG_PM_RUNTIME) 1352#if defined(CONFIG_PM_RUNTIME)
1353static void omap_gpio_restore_context(struct gpio_bank *bank) 1353static void omap_gpio_restore_context(struct gpio_bank *bank)
1354{ 1354{
1355 __raw_writel(bank->context.irqenable1,
1356 bank->base + bank->regs->irqenable);
1357 __raw_writel(bank->context.irqenable2,
1358 bank->base + bank->regs->irqenable2);
1359 __raw_writel(bank->context.wake_en, 1355 __raw_writel(bank->context.wake_en,
1360 bank->base + bank->regs->wkup_en); 1356 bank->base + bank->regs->wkup_en);
1361 __raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl); 1357 __raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl);
@@ -1375,6 +1371,11 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
1375 __raw_writel(bank->context.debounce_en, 1371 __raw_writel(bank->context.debounce_en,
1376 bank->base + bank->regs->debounce_en); 1372 bank->base + bank->regs->debounce_en);
1377 } 1373 }
1374
1375 __raw_writel(bank->context.irqenable1,
1376 bank->base + bank->regs->irqenable);
1377 __raw_writel(bank->context.irqenable2,
1378 bank->base + bank->regs->irqenable2);
1378} 1379}
1379#endif /* CONFIG_PM_RUNTIME */ 1380#endif /* CONFIG_PM_RUNTIME */
1380#else 1381#else