]> Pileus Git - ~andy/linux/commitdiff
ARM: shmobile: sh73a0: Remove global GPIO_NR definition
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 29 Jul 2013 19:33:54 +0000 (21:33 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 6 Aug 2013 09:07:13 +0000 (18:07 +0900)
The total number of SoC GPIOs is only used to compute the base GPIO
number of th PCF8575 GPIO extender on the KZM9G board. As GPIO
allocation became fully dynamic with DT, no other SH73A0 board will use
the GPIO_NR macro. Move it to the KZM9G board file.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/board-kzm9g.c
arch/arm/mach-shmobile/include/mach/sh73a0.h

index 1068120d339fafe189f298d94c00a4b0e4862fa0..f1994968d303eac3bf022501c2d8007343b261e0 100644 (file)
 /*
  * external GPIO
  */
-#define GPIO_PCF8575_BASE      (GPIO_NR)
-#define GPIO_PCF8575_PORT10    (GPIO_NR + 8)
-#define GPIO_PCF8575_PORT11    (GPIO_NR + 9)
-#define GPIO_PCF8575_PORT12    (GPIO_NR + 10)
-#define GPIO_PCF8575_PORT13    (GPIO_NR + 11)
-#define GPIO_PCF8575_PORT14    (GPIO_NR + 12)
-#define GPIO_PCF8575_PORT15    (GPIO_NR + 13)
-#define GPIO_PCF8575_PORT16    (GPIO_NR + 14)
+#define GPIO_PCF8575_BASE      (310)
+#define GPIO_PCF8575_PORT10    (GPIO_PCF8575_BASE + 8)
+#define GPIO_PCF8575_PORT11    (GPIO_PCF8575_BASE + 9)
+#define GPIO_PCF8575_PORT12    (GPIO_PCF8575_BASE + 10)
+#define GPIO_PCF8575_PORT13    (GPIO_PCF8575_BASE + 11)
+#define GPIO_PCF8575_PORT14    (GPIO_PCF8575_BASE + 12)
+#define GPIO_PCF8575_PORT15    (GPIO_PCF8575_BASE + 13)
+#define GPIO_PCF8575_PORT16    (GPIO_PCF8575_BASE + 14)
 
 /* Dummy supplies, where voltage doesn't matter */
 static struct regulator_consumer_supply dummy_supplies[] = {
index 680dc5f1655ab46c4eaafc7a46c430bd141a6ccd..359b582dc270d6a96408b145a063f7ebf12b6a3c 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __ASM_SH73A0_H__
 #define __ASM_SH73A0_H__
 
-#define GPIO_NR                        310
-
 /* DMA slave IDs */
 enum {
        SHDMA_SLAVE_INVALID,