Commit ee4645b2 authored by Kevin Hilman's avatar Kevin Hilman Committed by Tony Lindgren

OMAP2/3: GPIO: do not attempt to wake-enable

The GPIO IRQ enable/disable path attempts to also enable IRQ wake
support for the parent GPIO bank IRQ as well.  However, since there is
no 'set_wake' hook for the bank IRQs, these calls will always fail.
Also, since the enable will fail on the suspend path, the disable on
the resume path will trigger unbalanced enable/disable warnings.

This was discovered in the suspend/resume path on OMAP3/Beagle using
the gpio-keys driver which disables/re-enables GPIO IRQ wakeups in the
suspend/resume path.
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent c1801bba
...@@ -837,13 +837,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) ...@@ -837,13 +837,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
case METHOD_MPUIO: case METHOD_MPUIO:
case METHOD_GPIO_1610: case METHOD_GPIO_1610:
spin_lock_irqsave(&bank->lock, flags); spin_lock_irqsave(&bank->lock, flags);
if (enable) { if (enable)
bank->suspend_wakeup |= (1 << gpio); bank->suspend_wakeup |= (1 << gpio);
enable_irq_wake(bank->irq); else
} else {
disable_irq_wake(bank->irq);
bank->suspend_wakeup &= ~(1 << gpio); bank->suspend_wakeup &= ~(1 << gpio);
}
spin_unlock_irqrestore(&bank->lock, flags); spin_unlock_irqrestore(&bank->lock, flags);
return 0; return 0;
#endif #endif
...@@ -856,13 +853,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) ...@@ -856,13 +853,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
return -EINVAL; return -EINVAL;
} }
spin_lock_irqsave(&bank->lock, flags); spin_lock_irqsave(&bank->lock, flags);
if (enable) { if (enable)
bank->suspend_wakeup |= (1 << gpio); bank->suspend_wakeup |= (1 << gpio);
enable_irq_wake(bank->irq); else
} else {
disable_irq_wake(bank->irq);
bank->suspend_wakeup &= ~(1 << gpio); bank->suspend_wakeup &= ~(1 << gpio);
}
spin_unlock_irqrestore(&bank->lock, flags); spin_unlock_irqrestore(&bank->lock, flags);
return 0; return 0;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment