aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/pfc-r8a7740.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/pfc-r8a7740.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/pfc-r8a7740.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7740.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index 957502ebcc5b..a22763e3a32e 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -1654,11 +1654,13 @@ static pinmux_enum_t pinmux_data[] = {
1654 PINMUX_DATA(TRACEAUD_FROM_MEMC_MARK, MSEL5CR_30_1, MSEL5CR_29_0), 1654 PINMUX_DATA(TRACEAUD_FROM_MEMC_MARK, MSEL5CR_30_1, MSEL5CR_29_0),
1655}; 1655};
1656 1656
1657static struct pinmux_gpio pinmux_gpios[] = { 1657static struct pinmux_pin pinmux_pins[] = {
1658
1659 /* PORT */
1660 GPIO_PORT_ALL(), 1658 GPIO_PORT_ALL(),
1659};
1660
1661#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1661 1662
1663static struct pinmux_func pinmux_func_gpios[] = {
1662 /* IRQ */ 1664 /* IRQ */
1663 GPIO_FN(IRQ0_PORT2), GPIO_FN(IRQ0_PORT13), 1665 GPIO_FN(IRQ0_PORT2), GPIO_FN(IRQ0_PORT13),
1664 GPIO_FN(IRQ1), 1666 GPIO_FN(IRQ1),
@@ -2592,9 +2594,10 @@ struct sh_pfc_soc_info r8a7740_pinmux_info = {
2592 .function = { PINMUX_FUNCTION_BEGIN, 2594 .function = { PINMUX_FUNCTION_BEGIN,
2593 PINMUX_FUNCTION_END }, 2595 PINMUX_FUNCTION_END },
2594 2596
2595 .gpios = pinmux_gpios, 2597 .pins = pinmux_pins,
2596 .nr_pins = GPIO_PORT211 + 1, 2598 .nr_pins = ARRAY_SIZE(pinmux_pins),
2597 .nr_gpios = ARRAY_SIZE(pinmux_gpios), 2599 .func_gpios = pinmux_func_gpios,
2600 .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
2598 2601
2599 .cfg_regs = pinmux_config_regs, 2602 .cfg_regs = pinmux_config_regs,
2600 .data_regs = pinmux_data_regs, 2603 .data_regs = pinmux_data_regs,