]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
gpio/omap: fix missing dataout context save in _set_gpio_dataout_reg
authorTarun Kanti DebBarma <tarun.kanti@ti.com>
Fri, 2 Mar 2012 07:22:52 +0000 (12:52 +0530)
committerTarun Kanti DebBarma <tarun.kanti@ti.com>
Tue, 20 Mar 2012 09:59:52 +0000 (15:29 +0530)
There are two functions, _set_gpio_dataout_reg() and _set_gpio_dataout_mask()
which writes to dataout register and the dataout context must be saved.
It is missing in the first function, _set_gpio_dataout_reg(). Fix this.

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>
drivers/gpio/gpio-omap.c

index 8901d576cb7d34cd743e74977dbf37b807be4ac2..bbe9648990172c41932e9de8767fe18b05f4123b 100644 (file)
@@ -120,10 +120,13 @@ static void _set_gpio_dataout_reg(struct gpio_bank *bank, int gpio, int enable)
        void __iomem *reg = bank->base;
        u32 l = GPIO_BIT(bank, gpio);
 
-       if (enable)
+       if (enable) {
                reg += bank->regs->set_dataout;
-       else
+               bank->context.dataout |= l;
+       } else {
                reg += bank->regs->clr_dataout;
+               bank->context.dataout &= ~l;
+       }
 
        __raw_writel(l, reg);
 }