aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 484e7a8..203a813 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1312,7 +1312,7 @@ static int omap_gpio_resume(struct device *dev)
static void omap_gpio_save_context(struct gpio_bank *bank);
static void omap_gpio_restore_context(struct gpio_bank *bank);
-static void omap2_gpio_set_wakeupenables(struct gpio_bank *bank)
+static void omap2_gpio_set_wakeupenables(struct gpio_bank *bank, bool suspend)
{
unsigned long pad_wakeup;
int i;
@@ -1324,8 +1324,10 @@ static void omap2_gpio_set_wakeupenables(struct gpio_bank *bank)
"failed\n", __func__, bank->id);
return;
}
-
- pad_wakeup = __raw_readl(bank->base + bank->regs->irqenable);
+ if (suspend)
+ pad_wakeup = bank->suspend_wakeup;
+ else
+ pad_wakeup = __raw_readl(bank->base + bank->regs->irqenable);
/*
* HACK: Ignore gpios that have multiple sources.
@@ -1590,7 +1592,7 @@ int omap2_gpio_prepare_for_idle(int off_mode, bool suspend)
if (!bank->mod_usage)
continue;
- omap2_gpio_set_wakeupenables(bank);
+ omap2_gpio_set_wakeupenables(bank, suspend);
if (omap2_gpio_set_edge_wakeup(bank, suspend))
ret = -EBUSY;