pinctrl: sh-pfc: r8a7795: Make PORT_GP_x() macros consistent
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 28 Oct 2015 09:17:55 +0000 (10:17 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 30 Nov 2015 12:41:33 +0000 (13:41 +0100)
On r8a7795, PORT_GP_x() is a macro for defining GPIOs 0..x.
In all other sh-pfc code, PORT_GP_x() is a macro for defining GPIOs
0..(x-1).

Make the r8a7795 macro definitions consistent with the rest of the
sh-pfc codebase.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/pinctrl/sh-pfc/pfc-r8a7795.c

index 7ddb2adfc5a53d7b6c35fee2182bc05ce009cb31..29d001b8a727e154a053fced803f8c3da699f0c0 100644 (file)
 #include "core.h"
 #include "sh_pfc.h"
 
-#define PORT_GP_3(bank, fn, sfx)                                       \
+#define PORT_GP_4(bank, fn, sfx)                                       \
        PORT_GP_1(bank, 0,  fn, sfx), PORT_GP_1(bank, 1,  fn, sfx),     \
        PORT_GP_1(bank, 2,  fn, sfx), PORT_GP_1(bank, 3,  fn, sfx)
 
-#define PORT_GP_14(bank, fn, sfx)                                      \
-       PORT_GP_3(bank, fn, sfx),                                       \
+#define PORT_GP_15(bank, fn, sfx)                                      \
+       PORT_GP_4(bank, fn, sfx),                                       \
        PORT_GP_1(bank, 4,  fn, sfx), PORT_GP_1(bank, 5,  fn, sfx),     \
        PORT_GP_1(bank, 6,  fn, sfx), PORT_GP_1(bank, 7,  fn, sfx),     \
        PORT_GP_1(bank, 8,  fn, sfx), PORT_GP_1(bank, 9,  fn, sfx),     \
        PORT_GP_1(bank, 12, fn, sfx), PORT_GP_1(bank, 13, fn, sfx),     \
        PORT_GP_1(bank, 14, fn, sfx)
 
-#define PORT_GP_15(bank, fn, sfx)                                      \
-       PORT_GP_14(bank, fn, sfx),   PORT_GP_1(bank, 15, fn, sfx)
+#define PORT_GP_16(bank, fn, sfx)                                      \
+       PORT_GP_15(bank, fn, sfx),   PORT_GP_1(bank, 15, fn, sfx)
 
-#define PORT_GP_17(bank, fn, sfx)                                      \
-       PORT_GP_15(bank, fn, sfx),                                      \
+#define PORT_GP_18(bank, fn, sfx)                                      \
+       PORT_GP_16(bank, fn, sfx),                                      \
        PORT_GP_1(bank, 16, fn, sfx), PORT_GP_1(bank, 17, fn, sfx)
 
-#define PORT_GP_25(bank, fn, sfx)                                      \
-       PORT_GP_17(bank, fn, sfx),                                      \
+#define PORT_GP_26(bank, fn, sfx)                                      \
+       PORT_GP_18(bank, fn, sfx),                                      \
        PORT_GP_1(bank, 18, fn, sfx), PORT_GP_1(bank, 19, fn, sfx),     \
        PORT_GP_1(bank, 20, fn, sfx), PORT_GP_1(bank, 21, fn, sfx),     \
        PORT_GP_1(bank, 22, fn, sfx), PORT_GP_1(bank, 23, fn, sfx),     \
        PORT_GP_1(bank, 24, fn, sfx), PORT_GP_1(bank, 25, fn, sfx)
 
-#define PORT_GP_27(bank, fn, sfx)                                      \
-       PORT_GP_25(bank, fn, sfx),                                      \
+#define PORT_GP_28(bank, fn, sfx)                                      \
+       PORT_GP_26(bank, fn, sfx),                                      \
        PORT_GP_1(bank, 26, fn, sfx), PORT_GP_1(bank, 27, fn, sfx)
 
 #define CPU_ALL_PORT(fn, sfx)                                          \
-       PORT_GP_15(0, fn, sfx),                                         \
-       PORT_GP_27(1, fn, sfx),                                         \
-       PORT_GP_14(2, fn, sfx),                                         \
-       PORT_GP_15(3, fn, sfx),                                         \
-       PORT_GP_17(4, fn, sfx),                                         \
-       PORT_GP_25(5, fn, sfx),                                         \
+       PORT_GP_16(0, fn, sfx),                                         \
+       PORT_GP_28(1, fn, sfx),                                         \
+       PORT_GP_15(2, fn, sfx),                                         \
+       PORT_GP_16(3, fn, sfx),                                         \
+       PORT_GP_18(4, fn, sfx),                                         \
+       PORT_GP_26(5, fn, sfx),                                         \
        PORT_GP_32(6, fn, sfx),                                         \
-       PORT_GP_3(7, fn, sfx)
+       PORT_GP_4(7, fn, sfx)
 /*
  * F_() : just information
  * FM() : macro for FN_xxx / xxx_MARK