diff options
author | Charulatha V <charu@ti.com> | 2011-05-25 11:23:50 +0530 |
---|---|---|
committer | Tarun Kanti DebBarma <tarun.kanti@ti.com> | 2012-02-06 14:13:43 +0530 |
commit | fad96ea825e7a8ee0c5b77292b470e4978157ee7 (patch) | |
tree | 1e013b7a881a3abaa6a6e6b1812bfdd38537cae1 /drivers/gpio/gpio-omap.c | |
parent | ab985f0f7c2c0ef90b7c832f0c04f470dda0593d (diff) | |
download | talos-obmc-linux-fad96ea825e7a8ee0c5b77292b470e4978157ee7.tar.gz talos-obmc-linux-fad96ea825e7a8ee0c5b77292b470e4978157ee7.zip |
gpio/omap: use pinctrl offset instead of macro
Use regs->pinctrl field instead of using the macro OMAP1510_GPIO_PIN_CONTROL
Signed-off-by: Charulatha V <charu@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index a948351ad6c4..485b6b207ef9 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -490,15 +490,13 @@ static int omap_gpio_request(struct gpio_chip *chip, unsigned offset) */ _set_gpio_triggering(bank, offset, IRQ_TYPE_NONE); -#ifdef CONFIG_ARCH_OMAP15XX - if (bank->method == METHOD_GPIO_1510) { - void __iomem *reg; + if (bank->regs->pinctrl) { + void __iomem *reg = bank->base + bank->regs->pinctrl; /* Claim the pin for MPU */ - reg = bank->base + OMAP1510_GPIO_PIN_CONTROL; __raw_writel(__raw_readl(reg) | (1 << offset), reg); } -#endif + if (bank->regs->ctrl && !bank->mod_usage) { void __iomem *reg = bank->base + bank->regs->ctrl; u32 ctrl; |