mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
gpio/omap: debounce remove SoC specific registers, use pdata
Use register offsets passed in from pdata for accessing debounce registers. Signed-off-by: Kevin Hilman <[email protected]>
This commit is contained in:
parent
f64ad1a0e2
commit
9942da0e4b
3 changed files with 9 additions and 12 deletions
|
|
@ -168,7 +168,7 @@ do { \
|
|||
static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
|
||||
unsigned debounce)
|
||||
{
|
||||
void __iomem *reg = bank->base;
|
||||
void __iomem *reg;
|
||||
u32 val;
|
||||
u32 l;
|
||||
|
||||
|
|
@ -184,19 +184,10 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
|
|||
|
||||
l = GPIO_BIT(bank, gpio);
|
||||
|
||||
if (bank->method == METHOD_GPIO_44XX)
|
||||
reg += OMAP4_GPIO_DEBOUNCINGTIME;
|
||||
else
|
||||
reg += OMAP24XX_GPIO_DEBOUNCE_VAL;
|
||||
|
||||
reg = bank->base + bank->regs->debounce;
|
||||
__raw_writel(debounce, reg);
|
||||
|
||||
reg = bank->base;
|
||||
if (bank->method == METHOD_GPIO_44XX)
|
||||
reg += OMAP4_GPIO_DEBOUNCENABLE;
|
||||
else
|
||||
reg += OMAP24XX_GPIO_DEBOUNCE_EN;
|
||||
|
||||
reg = bank->base + bank->regs->debounce_en;
|
||||
val = __raw_readl(reg);
|
||||
|
||||
if (debounce) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue