]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_*
authorTarun Kanti DebBarma <tarun.kanti@ti.com>
Mon, 5 Mar 2012 10:30:54 +0000 (16:00 +0530)
committerTarun Kanti DebBarma <tarun.kanti@ti.com>
Tue, 20 Mar 2012 10:02:46 +0000 (15:32 +0530)
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>
drivers/gpio/gpio-omap.c

index bbe9648990172c41932e9de8767fe18b05f4123b..bcb1061dbd6dcef35bfff6f0394b96566234aafe 100644 (file)
@@ -1247,9 +1247,6 @@ static int omap_gpio_runtime_suspend(struct device *dev)
         * non-wakeup GPIOs.  Otherwise spurious IRQs will be
         * generated.  See OMAP2420 Errata item 1.101.
         */
-       if (!(bank->enabled_non_wakeup_gpios))
-               goto update_gpio_context_count;
-
        bank->saved_datain = __raw_readl(bank->base +
                                                bank->regs->datain);
        l1 = __raw_readl(bank->base + bank->regs->fallingdetect);
@@ -1298,7 +1295,7 @@ static int omap_gpio_runtime_resume(struct device *dev)
        __raw_writel(bank->context.risingdetect,
                     bank->base + bank->regs->risingdetect);
 
-       if (!bank->enabled_non_wakeup_gpios || !bank->workaround_enabled) {
+       if (!bank->workaround_enabled) {
                spin_unlock_irqrestore(&bank->lock, flags);
                return 0;
        }