summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
diff options
context:
space:
mode:
authorLaurent Pinchart2012-11-29 13:24:07 +0100
committerLaurent Pinchart2013-03-15 13:33:38 +0100
commita373ed0aa229f06e7d699797669b664ef39d97c1 (patch)
tree0fe20a0492d3bd6953fc706eaa97bc28d7e14ff9 /drivers/pinctrl/sh-pfc/pfc-sh73a0.c
parentsh-pfc: Don't needlessly check GPIO type in sh_gpio_free() (diff)
downloadkernel-qcow2-linux-a373ed0aa229f06e7d699797669b664ef39d97c1.tar.gz
kernel-qcow2-linux-a373ed0aa229f06e7d699797669b664ef39d97c1.tar.xz
kernel-qcow2-linux-a373ed0aa229f06e7d699797669b664ef39d97c1.zip
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/pfc-sh73a0.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh73a0.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
index e41aa21edac0..02cb1dc6d12e 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
@@ -1539,9 +1539,13 @@ static pinmux_enum_t pinmux_data[] = {
PINMUX_DATA(FSIAISLD_PU_MARK, PORT55_FN1, PORT55_IN_PU),
};
-static struct pinmux_gpio pinmux_gpios[] = {
+static struct pinmux_pin pinmux_pins[] = {
GPIO_PORT_ALL(),
+};
+
+#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
+static struct pinmux_func pinmux_func_gpios[] = {
/* Table 25-1 (Functions 0-7) */
GPIO_FN(VBUS_0),
GPIO_FN(GPI0),
@@ -2776,9 +2780,10 @@ struct sh_pfc_soc_info sh73a0_pinmux_info = {
.output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
.function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
- .gpios = pinmux_gpios,
- .nr_pins = GPIO_PORT309 + 1,
- .nr_gpios = ARRAY_SIZE(pinmux_gpios),
+ .pins = pinmux_pins,
+ .nr_pins = ARRAY_SIZE(pinmux_pins),
+ .func_gpios = pinmux_func_gpios,
+ .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
.cfg_regs = pinmux_config_regs,
.data_regs = pinmux_data_regs,