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>
This commit is contained in:
Laurent Pinchart
2012-11-29 13:24:07 +01:00
parent 24d6b36e91
commit a373ed0aa2
20 changed files with 193 additions and 106 deletions

View File

@@ -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;
}