aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-11-29 07:24:07 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:33:38 -0400
commita373ed0aa229f06e7d699797669b664ef39d97c1 (patch)
tree0fe20a0492d3bd6953fc706eaa97bc28d7e14ff9 /drivers/pinctrl/sh-pfc/gpio.c
parent24d6b36e91b0503cd1c88b34fa793c0c65fa767d (diff)
sh-pfc: Split pins and functions definition tables
Split the GPIOs table into a pins table for real GPIOs and a functions table for function GPIOs. Only register pins with the pinctrl core. The function GPIOs remain accessible as GPIOs. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 8f01113d0ecb..2a99bef281ad 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -183,7 +183,7 @@ static void sh_pfc_gpio_setup(struct sh_pfc_chip *chip)
183 gc->label = pfc->info->name; 183 gc->label = pfc->info->name;
184 gc->owner = THIS_MODULE; 184 gc->owner = THIS_MODULE;
185 gc->base = 0; 185 gc->base = 0;
186 gc->ngpio = pfc->info->nr_gpios; 186 gc->ngpio = pfc->info->nr_pins + pfc->info->nr_func_gpios;
187} 187}
188 188
189int sh_pfc_register_gpiochip(struct sh_pfc *pfc) 189int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
@@ -206,7 +206,8 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
206 pfc->gpio = chip; 206 pfc->gpio = chip;
207 207
208 pr_info("%s handling gpio 0 -> %u\n", 208 pr_info("%s handling gpio 0 -> %u\n",
209 pfc->info->name, pfc->info->nr_gpios - 1); 209 pfc->info->name,
210 pfc->info->nr_pins + pfc->info->nr_func_gpios - 1);
210 211
211 return 0; 212 return 0;
212} 213}