aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAmbresh K <ambresh@ti.com>2011-06-15 16:40:45 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-06-16 10:40:43 -0400
commit55b220cafadd71b9f83759f7b396998b2547dc5f (patch)
tree220005da0cc200ed5f385d3077ef86f1a5e80a4a /drivers/gpio
parent2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff)
gpio/omap4: 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. Reported-by: Philippe Mazet <p-mazet@ti.com> Tested-by: Philippe Mazet <p-mazet@ti.com> Signed-off-by: Ambresh K <ambresh@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
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 01f74a8459d9..35bebde23e83 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -469,8 +469,9 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
469 + OMAP24XX_GPIO_CLEARWKUENA); 469 + OMAP24XX_GPIO_CLEARWKUENA);
470 } 470 }
471 } 471 }
472 /* This part needs to be executed always for OMAP34xx */ 472 /* This part needs to be executed always for OMAP{34xx, 44xx} */
473 if (cpu_is_omap34xx() || (bank->non_wakeup_gpios & gpio_bit)) { 473 if (cpu_is_omap34xx() || cpu_is_omap44xx() ||
474 (bank->non_wakeup_gpios & gpio_bit)) {
474 /* 475 /*
475 * Log the edge gpio and manually trigger the IRQ 476 * Log the edge gpio and manually trigger the IRQ
476 * after resume if the input level changes 477 * after resume if the input level changes