summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-12-15 23:51:20 +0100
committerSimon Horman <horms+renesas@verge.net.au>2013-01-25 09:24:26 +0900
commit19bb7fe36950ff74ce322cc29f6f4e025999f1f0 (patch)
tree60bfaecf7af2940af44928131cba9054004105e6 /drivers/pinctrl/sh-pfc/gpio.c
parent6e54d8d252ed09ae148af6565971974af9a96e10 (diff)
sh-pfc: Support pinmux info in driver data instead of platform data
Pinmux information should be provided by the pinmux driver, not arch code. Make it possible to do so by supporting pinmux information passed through the driver_data field in the platform ID table. Platform data will remain supported until all arch code has been converted. Rename the sh_pfc_platform_data structure to sh_pfc_soc_info to reflect this. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index a0454f32171..3cbdfea1dec 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -106,11 +106,11 @@ static int sh_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
if (pos <= 0 || !enum_id)
break;
- for (i = 0; i < pfc->pdata->gpio_irq_size; i++) {
- enum_ids = pfc->pdata->gpio_irq[i].enum_ids;
+ for (i = 0; i < pfc->info->gpio_irq_size; i++) {
+ enum_ids = pfc->info->gpio_irq[i].enum_ids;
for (k = 0; enum_ids[k]; k++) {
if (enum_ids[k] == enum_id)
- return pfc->pdata->gpio_irq[i].irq;
+ return pfc->info->gpio_irq[i].irq;
}
}
}
@@ -131,12 +131,12 @@ static void sh_pfc_gpio_setup(struct sh_pfc_chip *chip)
gc->set = sh_gpio_set;
gc->to_irq = sh_gpio_to_irq;
- WARN_ON(pfc->pdata->first_gpio != 0); /* needs testing */
+ WARN_ON(pfc->info->first_gpio != 0); /* needs testing */
- gc->label = pfc->pdata->name;
+ gc->label = pfc->info->name;
gc->owner = THIS_MODULE;
- gc->base = pfc->pdata->first_gpio;
- gc->ngpio = (pfc->pdata->last_gpio - pfc->pdata->first_gpio) + 1;
+ gc->base = pfc->info->first_gpio;
+ gc->ngpio = (pfc->info->last_gpio - pfc->info->first_gpio) + 1;
}
int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
@@ -159,8 +159,8 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
pfc->gpio = chip;
pr_info("%s handling gpio %d -> %d\n",
- pfc->pdata->name, pfc->pdata->first_gpio,
- pfc->pdata->last_gpio);
+ pfc->info->name, pfc->info->first_gpio,
+ pfc->info->last_gpio);
return 0;
}