diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2012-11-29 07:24:07 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-15 08:33:38 -0400 |
commit | a373ed0aa229f06e7d699797669b664ef39d97c1 (patch) | |
tree | 0fe20a0492d3bd6953fc706eaa97bc28d7e14ff9 /drivers/pinctrl/sh-pfc/pfc-sh7785.c | |
parent | 24d6b36e91b0503cd1c88b34fa793c0c65fa767d (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/pfc-sh7785.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-sh7785.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7785.c b/drivers/pinctrl/sh-pfc/pfc-sh7785.c index 447bd921b0ea..cce232d47276 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh7785.c +++ b/drivers/pinctrl/sh-pfc/pfc-sh7785.c | |||
@@ -702,7 +702,7 @@ static pinmux_enum_t pinmux_data[] = { | |||
702 | PINMUX_DATA(IRQOUT_MARK, P2MSEL2_1), | 702 | PINMUX_DATA(IRQOUT_MARK, P2MSEL2_1), |
703 | }; | 703 | }; |
704 | 704 | ||
705 | static struct pinmux_gpio pinmux_gpios[] = { | 705 | static struct pinmux_pin pinmux_pins[] = { |
706 | /* PA */ | 706 | /* PA */ |
707 | PINMUX_GPIO(GPIO_PA7, PA7_DATA), | 707 | PINMUX_GPIO(GPIO_PA7, PA7_DATA), |
708 | PINMUX_GPIO(GPIO_PA6, PA6_DATA), | 708 | PINMUX_GPIO(GPIO_PA6, PA6_DATA), |
@@ -845,7 +845,11 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
845 | PINMUX_GPIO(GPIO_PR2, PR2_DATA), | 845 | PINMUX_GPIO(GPIO_PR2, PR2_DATA), |
846 | PINMUX_GPIO(GPIO_PR1, PR1_DATA), | 846 | PINMUX_GPIO(GPIO_PR1, PR1_DATA), |
847 | PINMUX_GPIO(GPIO_PR0, PR0_DATA), | 847 | PINMUX_GPIO(GPIO_PR0, PR0_DATA), |
848 | }; | ||
849 | |||
850 | #define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) | ||
848 | 851 | ||
852 | static struct pinmux_func pinmux_func_gpios[] = { | ||
849 | /* FN */ | 853 | /* FN */ |
850 | GPIO_FN(D63_AD31), | 854 | GPIO_FN(D63_AD31), |
851 | GPIO_FN(D62_AD30), | 855 | GPIO_FN(D62_AD30), |
@@ -1289,9 +1293,10 @@ struct sh_pfc_soc_info sh7785_pinmux_info = { | |||
1289 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, | 1293 | .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, |
1290 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, | 1294 | .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, |
1291 | 1295 | ||
1292 | .gpios = pinmux_gpios, | 1296 | .pins = pinmux_pins, |
1293 | .nr_pins = GPIO_PR0 + 1, | 1297 | .nr_pins = ARRAY_SIZE(pinmux_pins), |
1294 | .nr_gpios = ARRAY_SIZE(pinmux_gpios), | 1298 | .func_gpios = pinmux_func_gpios, |
1299 | .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios), | ||
1295 | 1300 | ||
1296 | .cfg_regs = pinmux_config_regs, | 1301 | .cfg_regs = pinmux_config_regs, |
1297 | .data_regs = pinmux_data_regs, | 1302 | .data_regs = pinmux_data_regs, |