summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-11-29 13:24:07 +0100
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 13:33:38 +0100
commita373ed0aa229f06e7d699797669b664ef39d97c1 (patch)
tree0fe20a0492d3bd6953fc706eaa97bc28d7e14ff9 /drivers/pinctrl/sh-pfc/gpio.c
parent24d6b36e91b0503cd1c88b34fa793c0c65fa767d (diff)
downloadop-kernel-dev-a373ed0aa229f06e7d699797669b664ef39d97c1.zip
op-kernel-dev-a373ed0aa229f06e7d699797669b664ef39d97c1.tar.gz
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 8f01113..2a99bef 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)
gc->label = pfc->info->name;
gc->owner = THIS_MODULE;
gc->base = 0;
- gc->ngpio = pfc->info->nr_gpios;
+ gc->ngpio = pfc->info->nr_pins + pfc->info->nr_func_gpios;
}
int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
@@ -206,7 +206,8 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
pfc->gpio = chip;
pr_info("%s handling gpio 0 -> %u\n",
- pfc->info->name, pfc->info->nr_gpios - 1);
+ pfc->info->name,
+ pfc->info->nr_pins + pfc->info->nr_func_gpios - 1);
return 0;
}
OpenPOWER on IntegriCloud