]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
gpio/omap: fix wakeup_en register update in _set_gpio_wakeup()
authorTarun Kanti DebBarma <tarun.kanti@ti.com>
Wed, 29 Feb 2012 16:19:21 +0000 (21:49 +0530)
committerTarun Kanti DebBarma <tarun.kanti@ti.com>
Tue, 20 Mar 2012 09:58:58 +0000 (15:28 +0530)
There are two ways through which wakeup_en register can be programmed
using gpiolib APIs as shown below. It is seen that in the second case
in _set_gpio_wakeup(), even though bank->suspend_wakeup is updated
correctly, its value is not programmed in wakeup_en register. Fix this.

irq_set_type()->gpio_irq_type()->_set_gpio_triggering()->set_gpio_trigger()
irq_set_wake()->gpio_wake_enable()->_set_gpio_wakeup()

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
drivers/gpio/gpio-omap.c

index 7cbad8569268fb18b2d28e2d7c144b93235ec3d7..1a144ac3b34ec4e7025c4d652deffd4076bc0d0b 100644 (file)
@@ -511,6 +511,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
        else
                bank->suspend_wakeup &= ~gpio_bit;
 
+       __raw_writel(bank->suspend_wakeup, bank->base + bank->regs->wkup_en);
        spin_unlock_irqrestore(&bank->lock, flags);
 
        return 0;