Tarun Kanti DebBarma 2a900eb74c gpio/omap: fix incorrect update to context.irqenable1
In _enable_gpio_irqbank() when bank->regs->set_irqenable is TRUE,
gpio_mask can be directly set by writing to set_irqenable register
without overwriting current value. In order to ensure the same is
stored in context.irqenable1, we must avoid overwriting it with
gpio_mask at the end of the function. Instead, update irqenable1
appropriately by OR'ing with gpio_mask.
For the case where bank->regs->set_irqenable is FALSE, irqenable1
can be directly overwritten with 'l' which holds correct computed
value.
        if (bank->regs->set_irqenable) {
                reg += bank->regs->set_irqenable;
                l = gpio_mask;
        } else {
                reg += bank->regs->irqenable;
                l = __raw_readl(reg);
                if (bank->regs->irqenable_inv)
                        l &= ~gpio_mask;
                else
                        l |= gpio_mask;
        }

Make similar change for _disable_gpio_irqbank().

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>
2012-03-21 10:18:54 +05:30
..
2012-02-06 14:37:52 -05:00
2012-01-26 18:36:48 +00:00
2012-02-02 14:00:43 +05:30
2012-02-09 15:41:29 -05:00
2012-03-08 17:21:51 -08:00
2012-03-12 09:41:28 -06:00
2012-03-12 09:41:28 -06:00
2012-03-12 09:41:28 -06:00
2012-02-01 19:35:21 +01:00
2012-02-13 11:57:58 -07:00
2012-02-01 15:26:00 -05:00
2012-01-13 10:12:23 -08:00
2012-03-02 15:21:15 -08:00
2012-01-02 13:04:55 +01:00
2012-01-11 23:58:47 -05:00