Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295653
b: refs/heads/master
c: ae54735
h: refs/heads/master
i:
  295651: 85ab1ab
v: v3
  • Loading branch information
Nishanth Menon authored and Tarun Kanti DebBarma committed Feb 6, 2012
1 parent bd8ceca commit dfb6e4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41d87cbd660fd5793a6c70f9c93d9dcc8964179d
refs/heads/master: ae547354a8ed59f19b57f7e1de9c7816edfc3537
12 changes: 12 additions & 0 deletions trunk/drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ struct gpio_regs {
u32 risingdetect;
u32 fallingdetect;
u32 dataout;
u32 debounce;
u32 debounce_en;
};

struct gpio_bank {
Expand Down Expand Up @@ -229,6 +231,10 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
* that point. Therefore we have to enable dbck here.
*/
_gpio_dbck_enable(bank);
if (bank->dbck_enable_mask) {
bank->context.debounce = debounce;
bank->context.debounce_en = val;
}
}

static inline void set_gpio_trigger(struct gpio_bank *bank, int gpio,
Expand Down Expand Up @@ -1363,6 +1369,12 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
__raw_writel(bank->context.fallingdetect,
bank->base + bank->regs->fallingdetect);
__raw_writel(bank->context.dataout, bank->base + bank->regs->dataout);
if (bank->dbck_enable_mask) {
__raw_writel(bank->context.debounce, bank->base +
bank->regs->debounce);
__raw_writel(bank->context.debounce_en,
bank->base + bank->regs->debounce_en);
}
}
#endif /* CONFIG_PM_RUNTIME */
#else
Expand Down

0 comments on commit dfb6e4d

Please sign in to comment.