aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/pfc-sh7723.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-11-29 06:24:51 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:33:37 -0400
commitcaa5bac3b4749ae3dca1db33d648280197f91a56 (patch)
tree46c1f7982dc320299740395fe1b0af543d8a0fc2 /drivers/pinctrl/sh-pfc/pfc-sh7723.c
parentd7a7ca5781fa2ac40319acc7125c487db5b26d91 (diff)
sh-pfc: Replace SoC info data and mark ranges with a number of pins
The data and mark ranges are only used to check whether a GPIO corresponds to a real pin or a function. As pins come first in the list of GPIOs and in the platform-specific GPIO enumerations, we can replace the data and mark ranges by a number of pins. Add an nr_pins field to struct sh_pfc_soc_info to store the number of pins implemented by the SoC, remove the data and mark range fields and introduce sh_pfc_gpio_is_pin() and sh_pfc_gpio_is_function() functions to replace range-based checks. 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-sh7723.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7723.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7723.c b/drivers/pinctrl/sh-pfc/pfc-sh7723.c
index f31aa4f6b165..160edf01c04b 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7723.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7723.c
@@ -1884,14 +1884,13 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1884struct sh_pfc_soc_info sh7723_pinmux_info = { 1884struct sh_pfc_soc_info sh7723_pinmux_info = {
1885 .name = "sh7723_pfc", 1885 .name = "sh7723_pfc",
1886 .reserved_id = PINMUX_RESERVED, 1886 .reserved_id = PINMUX_RESERVED,
1887 .data = { PINMUX_DATA_BEGIN, PINMUX_DATA_END },
1888 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 1887 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1889 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 1888 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
1890 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END }, 1889 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
1891 .mark = { PINMUX_MARK_BEGIN, PINMUX_MARK_END },
1892 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 1890 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
1893 1891
1894 .gpios = pinmux_gpios, 1892 .gpios = pinmux_gpios,
1893 .nr_pins = GPIO_PTZ0 + 1,
1895 .nr_gpios = ARRAY_SIZE(pinmux_gpios), 1894 .nr_gpios = ARRAY_SIZE(pinmux_gpios),
1896 1895
1897 .cfg_regs = pinmux_config_regs, 1896 .cfg_regs = pinmux_config_regs,