diff options
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index f28609d..2eac45b 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -777,14 +777,16 @@ static void gpio_unmask_irq(struct irq_data *d) if (trigger) _set_gpio_triggering(bank, GPIO_INDEX(bank, gpio), trigger); - /* For level-triggered GPIOs, the clearing must be done after - * the HW source is cleared, thus after the handler has run */ - if (bank->level_mask & irq_mask) { - _set_gpio_irqenable(bank, gpio, 0); + _set_gpio_irqenable(bank, gpio, 1); + /* + * For level-triggered GPIOs, the clearing must be done after + * the HW source is cleared, thus after the handler has run. + * Also, make sure to clear the status _after_ enabling the irq + * so that pending event will be cleared. + */ + if (bank->level_mask & irq_mask) _clear_gpio_irqstatus(bank, gpio); - } - _set_gpio_irqenable(bank, gpio, 1); spin_unlock_irqrestore(&bank->lock, flags); } |