Commit 754dfd79 authored by Russell King's avatar Russell King Committed by Linus Walleij

gpio: omap: clean up register access in omap2_set_gpio_debounce()

Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f1c32ef1
...@@ -181,7 +181,6 @@ static inline void omap_gpio_dbck_disable(struct gpio_bank *bank) ...@@ -181,7 +181,6 @@ static inline void omap_gpio_dbck_disable(struct gpio_bank *bank)
static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset, static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
unsigned debounce) unsigned debounce)
{ {
void __iomem *reg;
u32 val; u32 val;
u32 l; u32 l;
bool enable = !!debounce; bool enable = !!debounce;
...@@ -198,8 +197,7 @@ static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset, ...@@ -198,8 +197,7 @@ static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
l = BIT(offset); l = BIT(offset);
clk_enable(bank->dbck); clk_enable(bank->dbck);
reg = bank->base + bank->regs->debounce; writel_relaxed(debounce, bank->base + bank->regs->debounce);
writel_relaxed(debounce, reg);
val = omap_gpio_rmw(bank->base + bank->regs->debounce_en, l, enable); val = omap_gpio_rmw(bank->base + bank->regs->debounce_en, l, enable);
bank->dbck_enable_mask = val; bank->dbck_enable_mask = val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment