sh-pfc: r8a73a4: Support sparse GPIO numbers
authorMagnus Damm <damm@opensource.se>
Tue, 26 Mar 2013 13:49:59 +0000 (22:49 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 3 Apr 2013 01:30:38 +0000 (10:30 +0900)
The r8a73a4 SoC has sparse GPIO numbers. Declare ranges for pin numbers
in the PFC SoC data. Pin numbers shall be used with the GPIO API from
this point on.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/include/mach/r8a73a4.h
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c

index f0b1b4a962b3910437081904994a516ccbab99e4..2d4af4af3634399b655d657f37c3c161a905c26b 100644 (file)
@@ -86,7 +86,7 @@ enum {
        GPIO_PORT325, GPIO_PORT326, GPIO_PORT327, GPIO_PORT328, GPIO_PORT329,
 
        /* Port0 */
-       GPIO_FN_LCDD0,
+       GPIO_FN_LCDD0 = 330,
        GPIO_FN_PDM2_CLK_0,
        GPIO_FN_DU0_DR0,
        GPIO_FN_IRQ0,
index 47d75d5548eb8ed377e12f9d9fbdbda644c86cfe..5dd68fb96274cd8a75759a595975e8dddb2eaa90 100644 (file)
@@ -1424,6 +1424,20 @@ static struct sh_pfc_pin pinmux_pins[] = {
        GPIO_PORT_ALL(),
 };
 
+static const struct pinmux_range pinmux_ranges[] = {
+       {.begin = 0, .end = 30,},
+       {.begin = 32, .end = 40,},
+       {.begin = 64, .end = 85,},
+       {.begin = 96, .end = 126,},
+       {.begin = 128, .end = 134,},
+       {.begin = 160, .end = 178,},
+       {.begin = 192, .end = 222,},
+       {.begin = 224, .end = 250,},
+       {.begin = 256, .end = 283,},
+       {.begin = 288, .end = 308,},
+       {.begin = 320, .end = 329,},
+};
+
 #define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
 
 static const struct pinmux_func pinmux_func_gpios[] = {
@@ -2815,6 +2829,8 @@ const struct sh_pfc_soc_info r8a73a4_pinmux_info = {
 
        .pins = pinmux_pins,
        .nr_pins = ARRAY_SIZE(pinmux_pins),
+       .ranges = pinmux_ranges,
+       .nr_ranges = ARRAY_SIZE(pinmux_ranges),
        .func_gpios = pinmux_func_gpios,
        .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
 
This page took 0.026091 seconds and 5 git commands to generate.