diff options
author | Kevin Hilman <khilman@ti.com> | 2011-04-22 12:02:05 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-06-16 11:14:09 -0700 |
commit | 9942da0e4b037a852b230208410141768d473deb (patch) | |
tree | 71b4938b9a8ca1a8643876a221b546c578cc8b36 /drivers/gpio | |
parent | f64ad1a0e21a4948894c7a1b6f2f03b5e7151ddf (diff) | |
download | linux-3.10-9942da0e4b037a852b230208410141768d473deb.tar.gz linux-3.10-9942da0e4b037a852b230208410141768d473deb.tar.bz2 linux-3.10-9942da0e4b037a852b230208410141768d473deb.zip |
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 <khilman@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index dbe0cf36e90..f212d236f90 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -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) { |