Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295651
b: refs/heads/master
c: 6fd9c42
h: refs/heads/master
i:
  295649: d32c40a
  295647: 5f1c534
v: v3
  • Loading branch information
Tarun Kanti DebBarma committed Feb 6, 2012
1 parent c13317e commit 85ab1ab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72f83af99838bb663f85b65386db5b875748f379
refs/heads/master: 6fd9c421649961a9d6d30b149e0128dde1b806b4
18 changes: 13 additions & 5 deletions trunk/drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,22 +203,30 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,

l = GPIO_BIT(bank, gpio);

clk_enable(bank->dbck);
reg = bank->base + bank->regs->debounce;
__raw_writel(debounce, reg);

reg = bank->base + bank->regs->debounce_en;
val = __raw_readl(reg);

if (debounce) {
if (debounce)
val |= l;
clk_enable(bank->dbck);
} else {
else
val &= ~l;
clk_disable(bank->dbck);
}
bank->dbck_enable_mask = val;

__raw_writel(val, reg);
clk_disable(bank->dbck);
/*
* Enable debounce clock per module.
* This call is mandatory because in omap_gpio_request() when
* *_runtime_get_sync() is called, _gpio_dbck_enable() within
* runtime callbck fails to turn on dbck because dbck_enable_mask
* used within _gpio_dbck_enable() is still not initialized at
* that point. Therefore we have to enable dbck here.
*/
_gpio_dbck_enable(bank);
}

static inline void set_gpio_trigger(struct gpio_bank *bank, int gpio,
Expand Down

0 comments on commit 85ab1ab

Please sign in to comment.