diff options
author | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2012-03-05 05:30:54 -0500 |
---|---|---|
committer | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2012-03-20 06:02:46 -0400 |
commit | 960edffe29dfd845ee532ee51398592cba96d701 (patch) | |
tree | 6763cad852af2d069335a2398e7978144ac4c812 /drivers/gpio/gpio-omap.c | |
parent | 2c836f7ea5e7b5eec2a798e02b1d76ea791fa094 (diff) |
gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_*
In omap_gpio_runtime_suspend/resume() the context save/restore should
be independent of bank->enabled_non_wakeup_gpios. This was preventing
context restore of GPIO lines which are not wakeup enabled.
Reported-by: Govindraj Raja <govindraj.raja@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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index bbe964899017..bcb1061dbd6d 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c | |||
@@ -1247,9 +1247,6 @@ static int omap_gpio_runtime_suspend(struct device *dev) | |||
1247 | * non-wakeup GPIOs. Otherwise spurious IRQs will be | 1247 | * non-wakeup GPIOs. Otherwise spurious IRQs will be |
1248 | * generated. See OMAP2420 Errata item 1.101. | 1248 | * generated. See OMAP2420 Errata item 1.101. |
1249 | */ | 1249 | */ |
1250 | if (!(bank->enabled_non_wakeup_gpios)) | ||
1251 | goto update_gpio_context_count; | ||
1252 | |||
1253 | bank->saved_datain = __raw_readl(bank->base + | 1250 | bank->saved_datain = __raw_readl(bank->base + |
1254 | bank->regs->datain); | 1251 | bank->regs->datain); |
1255 | l1 = __raw_readl(bank->base + bank->regs->fallingdetect); | 1252 | l1 = __raw_readl(bank->base + bank->regs->fallingdetect); |
@@ -1298,7 +1295,7 @@ static int omap_gpio_runtime_resume(struct device *dev) | |||
1298 | __raw_writel(bank->context.risingdetect, | 1295 | __raw_writel(bank->context.risingdetect, |
1299 | bank->base + bank->regs->risingdetect); | 1296 | bank->base + bank->regs->risingdetect); |
1300 | 1297 | ||
1301 | if (!bank->enabled_non_wakeup_gpios || !bank->workaround_enabled) { | 1298 | if (!bank->workaround_enabled) { |
1302 | spin_unlock_irqrestore(&bank->lock, flags); | 1299 | spin_unlock_irqrestore(&bank->lock, flags); |
1303 | return 0; | 1300 | return 0; |
1304 | } | 1301 | } |