aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAmbresh K <ambresh@ti.com>2011-06-15 13:40:45 -0700
committerNishanth Menon <nm@ti.com>2011-06-17 11:39:17 -0500
commit5729c5c9ea33e9b893c88990c5ebd344b6c6bb12 (patch)
tree67ef557b881b9d6446dc47366ad43c6395664dfe /drivers/gpio
parentb3e33d7d9a645765aabbafc08b2107fd2dfeafd2 (diff)
downloadkernel_samsung_tuna-5729c5c9ea33e9b893c88990c5ebd344b6c6bb12.zip
kernel_samsung_tuna-5729c5c9ea33e9b893c88990c5ebd344b6c6bb12.tar.gz
kernel_samsung_tuna-5729c5c9ea33e9b893c88990c5ebd344b6c6bb12.tar.bz2
OMAP4: GPIO: Fix missing interrupts during device wakeup due to IOPAD.
If gpio pins from bank[2-5] are marked as wakeup enable and if the wake is through gpio IO pad wakeup, then that wakeup gpio interrupt is lost. In the current implementation, GPIO driver stores the context of DATAIN of all the gpio in the bank. During GPIO resuming, it checks DATAIN with wakeup enabled pins of gpio bank. If there is status change, then manually toggle GPIO_LEVELDETECT to generate pseudo interrupt. Pulled from upstream: http://marc.info/?t=130817060700006&r=1&w=2 Reported-by: Philippe Mazet <p-mazet@ti.com> Tested-by: Philippe Mazet <p-mazet@ti.com> Signed-off-by: Ambresh K <ambresh@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 13ca564..f1504ba 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -471,8 +471,9 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
+ OMAP24XX_GPIO_CLEARWKUENA);
}
}
- /* This part needs to be executed always for OMAP34xx */
- if (cpu_is_omap34xx() || (bank->non_wakeup_gpios & gpio_bit)) {
+ /* This part needs to be executed always for OMAP{34xx, 44xx} */
+ if (cpu_is_omap34xx() || cpu_is_omap44xx() ||
+ (bank->non_wakeup_gpios & gpio_bit)) {
/*
* Log the edge gpio and manually trigger the IRQ
* after resume if the input level changes