diff options
author | Charulatha V <charu@ti.com> | 2011-05-25 11:23:50 +0530 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-07-14 11:53:40 -0700 |
commit | 9877cd098e03484d483beb481170cda014423662 (patch) | |
tree | 332da4ac7e1a6c69eff17798c88a373b7d04800d /drivers/gpio | |
parent | 2e39056d8be434b15d40b46c150cb648724bd46b (diff) | |
download | kernel_samsung_tuna-9877cd098e03484d483beb481170cda014423662.zip kernel_samsung_tuna-9877cd098e03484d483beb481170cda014423662.tar.gz kernel_samsung_tuna-9877cd098e03484d483beb481170cda014423662.tar.bz2 |
GPIO: OMAP15xx: 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>
Diffstat (limited to 'drivers/gpio')
-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 01733d8..7d578e8 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -500,15 +500,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; |