aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-08-08 08:58:28 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-08-12 03:54:19 -0400
commit8f3c4537bb08001c4772d66ad3fcfcf24d8d180d (patch)
tree8cf16008305b6a0c6e0420e69a06d20b3ccd2469 /arch
parent01e7dc89d060413fd639635618de506093730964 (diff)
ARM: gpio: make trivial GPIOLIB implementation the default
Rather than marking the mach/gpio.h header files which want to use the trivial GPIOLIB implementation, mark those which do not want to use it instead. This means that by default, you get the trivial implementation and only have to do something extra if you need to. This should encourage the use of the trivial default implementation. As an additional bonus, several gpio.h header files become empty. Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Tested-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/gpio.h2
-rw-r--r--arch/arm/include/asm/hardware/iop3xx-gpio.h2
-rw-r--r--arch/arm/mach-at91/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-ep93xx/include/mach/gpio.h3
-rw-r--r--arch/arm/mach-exynos4/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-gemini/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-ks8695/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-msm/include/mach/gpio.h22
-rw-r--r--arch/arm/mach-mxs/include/mach/gpio.h3
-rw-r--r--arch/arm/mach-realview/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-s5pv210/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-sa1100/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-shmobile/include/mach/gpio.h6
-rw-r--r--arch/arm/mach-tegra/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-u300/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-versatile/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-vt8500/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-w90x900/include/mach/gpio.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/gpio.h3
-rw-r--r--arch/arm/plat-nomadik/include/plat/gpio.h2
-rw-r--r--arch/arm/plat-omap/include/plat/gpio.h2
-rw-r--r--arch/arm/plat-orion/include/plat/gpio.h2
-rw-r--r--arch/arm/plat-pxa/include/plat/gpio.h2
-rw-r--r--arch/arm/plat-spear/include/plat/gpio.h20
31 files changed, 22 insertions, 85 deletions
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 5032224eec3d..11ad0bfbb0ad 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -4,7 +4,7 @@
4/* not all ARM platforms necessarily support this API ... */ 4/* not all ARM platforms necessarily support this API ... */
5#include <mach/gpio.h> 5#include <mach/gpio.h>
6 6
7#ifdef __ARM_GPIOLIB_TRIVIAL 7#ifndef __ARM_GPIOLIB_COMPLEX
8/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ 8/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
9#include <asm-generic/gpio.h> 9#include <asm-generic/gpio.h>
10 10
diff --git a/arch/arm/include/asm/hardware/iop3xx-gpio.h b/arch/arm/include/asm/hardware/iop3xx-gpio.h
index b69d972b1f7d..9eda7dc92ad8 100644
--- a/arch/arm/include/asm/hardware/iop3xx-gpio.h
+++ b/arch/arm/include/asm/hardware/iop3xx-gpio.h
@@ -28,6 +28,8 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm-generic/gpio.h> 29#include <asm-generic/gpio.h>
30 30
31#define __ARM_GPIOLIB_COMPLEX
32
31#define IOP3XX_N_GPIOS 8 33#define IOP3XX_N_GPIOS 8
32 34
33static inline int gpio_get_value(unsigned gpio) 35static inline int gpio_get_value(unsigned gpio)
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
index 6ddc1a628b7e..2b9a1f51210f 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/arch/arm/mach-at91/include/mach/gpio.h
@@ -215,8 +215,6 @@ extern void at91_gpio_resume(void);
215 215
216#include <asm/errno.h> 216#include <asm/errno.h>
217 217
218#define __ARM_GPIOLIB_TRIVIAL
219
220#define gpio_to_irq(gpio) (gpio) 218#define gpio_to_irq(gpio) (gpio)
221#define irq_to_gpio(irq) (irq) 219#define irq_to_gpio(irq) (irq)
222 220
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
index 73fc7a087f83..14e7bb20a33a 100644
--- a/arch/arm/mach-davinci/include/mach/gpio.h
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -21,6 +21,8 @@
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <mach/common.h> 22#include <mach/common.h>
23 23
24#define __ARM_GPIOLIB_COMPLEX
25
24#define DAVINCI_GPIO_BASE 0x01C67000 26#define DAVINCI_GPIO_BASE 0x01C67000
25 27
26enum davinci_gpio_type { 28enum davinci_gpio_type {
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h
index fbc770e3e0cf..071f676c6e09 100644
--- a/arch/arm/mach-ep93xx/include/mach/gpio.h
+++ b/arch/arm/mach-ep93xx/include/mach/gpio.h
@@ -99,9 +99,6 @@
99/* maximum value for irq capable line identifiers */ 99/* maximum value for irq capable line identifiers */
100#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) 100#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
101 101
102/* new generic GPIO API - see Documentation/gpio.txt */
103#define __ARM_GPIOLIB_TRIVIAL
104
105/* 102/*
106 * Map GPIO A0..A7 (0..7) to irq 64..71, 103 * Map GPIO A0..A7 (0..7) to irq 64..71,
107 * B0..B7 (7..15) to irq 72..79, and 104 * B0..B7 (7..15) to irq 72..79, and
diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-exynos4/include/mach/gpio.h
index b91e8b2782bc..80523ca9bb49 100644
--- a/arch/arm/mach-exynos4/include/mach/gpio.h
+++ b/arch/arm/mach-exynos4/include/mach/gpio.h
@@ -146,6 +146,4 @@ enum s5p_gpio_number {
146#define ARCH_NR_GPIOS (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + \ 146#define ARCH_NR_GPIOS (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) + \
147 CONFIG_SAMSUNG_GPIO_EXTRA + 1) 147 CONFIG_SAMSUNG_GPIO_EXTRA + 1)
148 148
149#define __ARM_GPIOLIB_TRIVIAL
150
151#endif /* __ASM_ARCH_GPIO_H */ 149#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-gemini/include/mach/gpio.h b/arch/arm/mach-gemini/include/mach/gpio.h
index 20c0a3623779..40a0527bada7 100644
--- a/arch/arm/mach-gemini/include/mach/gpio.h
+++ b/arch/arm/mach-gemini/include/mach/gpio.h
@@ -14,8 +14,6 @@
14 14
15#include <mach/irqs.h> 15#include <mach/irqs.h>
16 16
17#define __ARM_GPIOLIB_TRIVIAL
18
19#define gpio_to_irq(x) ((x) + GPIO_IRQ_BASE) 17#define gpio_to_irq(x) ((x) + GPIO_IRQ_BASE)
20#define irq_to_gpio(x) ((x) - GPIO_IRQ_BASE) 18#define irq_to_gpio(x) ((x) - GPIO_IRQ_BASE)
21 19
diff --git a/arch/arm/mach-ixp4xx/include/mach/gpio.h b/arch/arm/mach-ixp4xx/include/mach/gpio.h
index 19009bf98a0e..83d6b4ed60bb 100644
--- a/arch/arm/mach-ixp4xx/include/mach/gpio.h
+++ b/arch/arm/mach-ixp4xx/include/mach/gpio.h
@@ -28,6 +28,8 @@
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30 30
31#define __ARM_GPIOLIB_COMPLEX
32
31static inline int gpio_request(unsigned gpio, const char *label) 33static inline int gpio_request(unsigned gpio, const char *label)
32{ 34{
33 return 0; 35 return 0;
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h
index 59d6b53d27c0..994267b02af8 100644
--- a/arch/arm/mach-ks8695/include/mach/gpio.h
+++ b/arch/arm/mach-ks8695/include/mach/gpio.h
@@ -40,8 +40,6 @@ extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
40 */ 40 */
41extern int irq_to_gpio(unsigned int irq); 41extern int irq_to_gpio(unsigned int irq);
42 42
43#define __ARM_GPIOLIB_TRIVIAL
44
45/* Register the GPIOs */ 43/* Register the GPIOs */
46extern void ks8695_register_gpios(void); 44extern void ks8695_register_gpios(void);
47 45
diff --git a/arch/arm/mach-lpc32xx/include/mach/gpio.h b/arch/arm/mach-lpc32xx/include/mach/gpio.h
index b01cd24715dc..66d31f615eb9 100644
--- a/arch/arm/mach-lpc32xx/include/mach/gpio.h
+++ b/arch/arm/mach-lpc32xx/include/mach/gpio.h
@@ -49,6 +49,4 @@
49 */ 49 */
50#define LPC32XX_GPIO(x, y) ((x) + (y)) 50#define LPC32XX_GPIO(x, y) ((x) + (y))
51 51
52#define __ARM_GPIOLIB_TRIVIAL
53
54#endif 52#endif
diff --git a/arch/arm/mach-msm/include/mach/gpio.h b/arch/arm/mach-msm/include/mach/gpio.h
index 10197a9e9d90..40a8c178f10d 100644
--- a/arch/arm/mach-msm/include/mach/gpio.h
+++ b/arch/arm/mach-msm/include/mach/gpio.h
@@ -1,21 +1 @@
1/* /* empty */
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
4 * Author: Mike Lockwood <lockwood@android.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16#ifndef __ASM_ARCH_MSM_GPIO_H
17#define __ASM_ARCH_MSM_GPIO_H
18
19#define __ARM_GPIOLIB_TRIVIAL
20
21#endif /* __ASM_ARCH_MSM_GPIO_H */
diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h
index bf28a1f8dc48..bb11e63261e4 100644
--- a/arch/arm/mach-mxs/include/mach/gpio.h
+++ b/arch/arm/mach-mxs/include/mach/gpio.h
@@ -22,9 +22,6 @@
22 22
23#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr)) 23#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
24 24
25/* use gpiolib dispatchers */
26#define __ARM_GPIOLIB_TRIVIAL
27
28#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START) 25#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
29 26
30#endif /* __MACH_MXS_GPIO_H__ */ 27#endif /* __MACH_MXS_GPIO_H__ */
diff --git a/arch/arm/mach-realview/include/mach/gpio.h b/arch/arm/mach-realview/include/mach/gpio.h
index 910974bbd83b..40a8c178f10d 100644
--- a/arch/arm/mach-realview/include/mach/gpio.h
+++ b/arch/arm/mach-realview/include/mach/gpio.h
@@ -1 +1 @@
#define __ARM_GPIOLIB_TRIVIAL /* empty */
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h
index d502d17d46bf..6fac70f3484e 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
@@ -11,8 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#define __ARM_GPIOLIB_TRIVIAL
15
16/* some boards require extra gpio capacity to support external 14/* some boards require extra gpio capacity to support external
17 * devices that need GPIO. 15 * devices that need GPIO.
18 */ 16 */
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-s3c64xx/include/mach/gpio.h
index 3a8857c68e4d..6e34c2f6e670 100644
--- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
+++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
@@ -12,8 +12,6 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13*/ 13*/
14 14
15#define __ARM_GPIOLIB_TRIVIAL
16
17/* GPIO bank sizes */ 15/* GPIO bank sizes */
18#define S3C64XX_GPIO_A_NR (8) 16#define S3C64XX_GPIO_A_NR (8)
19#define S3C64XX_GPIO_B_NR (7) 17#define S3C64XX_GPIO_B_NR (7)
diff --git a/arch/arm/mach-s5p64x0/include/mach/gpio.h b/arch/arm/mach-s5p64x0/include/mach/gpio.h
index c3a6aa0c472f..06cd3c9b16ac 100644
--- a/arch/arm/mach-s5p64x0/include/mach/gpio.h
+++ b/arch/arm/mach-s5p64x0/include/mach/gpio.h
@@ -13,8 +13,6 @@
13#ifndef __ASM_ARCH_GPIO_H 13#ifndef __ASM_ARCH_GPIO_H
14#define __ASM_ARCH_GPIO_H __FILE__ 14#define __ASM_ARCH_GPIO_H __FILE__
15 15
16#define __ARM_GPIOLIB_TRIVIAL
17
18/* GPIO bank sizes */ 16/* GPIO bank sizes */
19 17
20#define S5P6440_GPIO_A_NR (6) 18#define S5P6440_GPIO_A_NR (6)
diff --git a/arch/arm/mach-s5pc100/include/mach/gpio.h b/arch/arm/mach-s5pc100/include/mach/gpio.h
index 0e75641249c7..5e1a924b595f 100644
--- a/arch/arm/mach-s5pc100/include/mach/gpio.h
+++ b/arch/arm/mach-s5pc100/include/mach/gpio.h
@@ -15,8 +15,6 @@
15#ifndef __ASM_ARCH_GPIO_H 15#ifndef __ASM_ARCH_GPIO_H
16#define __ASM_ARCH_GPIO_H __FILE__ 16#define __ASM_ARCH_GPIO_H __FILE__
17 17
18#define __ARM_GPIOLIB_TRIVIAL
19
20/* GPIO bank sizes */ 18/* GPIO bank sizes */
21#define S5PC100_GPIO_A0_NR (8) 19#define S5PC100_GPIO_A0_NR (8)
22#define S5PC100_GPIO_A1_NR (5) 20#define S5PC100_GPIO_A1_NR (5)
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-s5pv210/include/mach/gpio.h
index d348ee2cb0ac..6c8b903c02e4 100644
--- a/arch/arm/mach-s5pv210/include/mach/gpio.h
+++ b/arch/arm/mach-s5pv210/include/mach/gpio.h
@@ -13,8 +13,6 @@
13#ifndef __ASM_ARCH_GPIO_H 13#ifndef __ASM_ARCH_GPIO_H
14#define __ASM_ARCH_GPIO_H __FILE__ 14#define __ASM_ARCH_GPIO_H __FILE__
15 15
16#define __ARM_GPIOLIB_TRIVIAL
17
18/* Practically, GPIO banks up to MP03 are the configurable gpio banks */ 16/* Practically, GPIO banks up to MP03 are the configurable gpio banks */
19 17
20/* GPIO bank sizes */ 18/* GPIO bank sizes */
diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h
index 7befc104e9a9..ab45b436b044 100644
--- a/arch/arm/mach-sa1100/include/mach/gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/gpio.h
@@ -28,6 +28,8 @@
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm-generic/gpio.h> 29#include <asm-generic/gpio.h>
30 30
31#define __ARM_GPIOLIB_COMPLEX
32
31static inline int gpio_get_value(unsigned gpio) 33static inline int gpio_get_value(unsigned gpio)
32{ 34{
33 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) 35 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
diff --git a/arch/arm/mach-shmobile/include/mach/gpio.h b/arch/arm/mach-shmobile/include/mach/gpio.h
index 95e11cfe4e41..7bf0890e16ba 100644
--- a/arch/arm/mach-shmobile/include/mach/gpio.h
+++ b/arch/arm/mach-shmobile/include/mach/gpio.h
@@ -18,13 +18,15 @@
18 18
19#ifdef CONFIG_GPIOLIB 19#ifdef CONFIG_GPIOLIB
20 20
21#define __ARM_GPIOLIB_TRIVIAL
22
23static inline int irq_to_gpio(unsigned int irq) 21static inline int irq_to_gpio(unsigned int irq)
24{ 22{
25 return -ENOSYS; 23 return -ENOSYS;
26} 24}
27 25
26#else
27
28#define __ARM_GPIOLIB_COMPLEX
29
28#endif /* CONFIG_GPIOLIB */ 30#endif /* CONFIG_GPIOLIB */
29 31
30#endif /* __ASM_ARCH_GPIO_H */ 32#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index 51072238d85a..e3538055f409 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -25,8 +25,6 @@
25 25
26#define TEGRA_NR_GPIOS INT_GPIO_NR 26#define TEGRA_NR_GPIOS INT_GPIO_NR
27 27
28#define __ARM_GPIOLIB_TRIVIAL
29
30#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) 28#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
31#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE) 29#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
32 30
diff --git a/arch/arm/mach-u300/include/mach/gpio.h b/arch/arm/mach-u300/include/mach/gpio.h
index 3d7b7d1291e2..9a890e2b74c7 100644
--- a/arch/arm/mach-u300/include/mach/gpio.h
+++ b/arch/arm/mach-u300/include/mach/gpio.h
@@ -18,6 +18,8 @@
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19#include <asm/irq.h> 19#include <asm/irq.h>
20 20
21#define __ARM_GPIOLIB_COMPLEX
22
21/* Switch type depending on platform/chip variant */ 23/* Switch type depending on platform/chip variant */
22#if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) 24#if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330)
23#define U300_COH901335 25#define U300_COH901335
diff --git a/arch/arm/mach-versatile/include/mach/gpio.h b/arch/arm/mach-versatile/include/mach/gpio.h
index 910974bbd83b..40a8c178f10d 100644
--- a/arch/arm/mach-versatile/include/mach/gpio.h
+++ b/arch/arm/mach-versatile/include/mach/gpio.h
@@ -1 +1 @@
#define __ARM_GPIOLIB_TRIVIAL /* empty */
diff --git a/arch/arm/mach-vt8500/include/mach/gpio.h b/arch/arm/mach-vt8500/include/mach/gpio.h
index 910974bbd83b..40a8c178f10d 100644
--- a/arch/arm/mach-vt8500/include/mach/gpio.h
+++ b/arch/arm/mach-vt8500/include/mach/gpio.h
@@ -1 +1 @@
#define __ARM_GPIOLIB_TRIVIAL /* empty */
diff --git a/arch/arm/mach-w90x900/include/mach/gpio.h b/arch/arm/mach-w90x900/include/mach/gpio.h
index e7d4ed156802..5385a4203277 100644
--- a/arch/arm/mach-w90x900/include/mach/gpio.h
+++ b/arch/arm/mach-w90x900/include/mach/gpio.h
@@ -16,8 +16,6 @@
16#include <mach/hardware.h> 16#include <mach/hardware.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18 18
19#define __ARM_GPIOLIB_TRIVIAL
20
21static inline int gpio_to_irq(unsigned gpio) 19static inline int gpio_to_irq(unsigned gpio)
22{ 20{
23 return gpio; 21 return gpio;
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h
index 4398edd03780..3e1ffc8b8f0c 100644
--- a/arch/arm/plat-mxc/include/mach/gpio.h
+++ b/arch/arm/plat-mxc/include/mach/gpio.h
@@ -27,9 +27,6 @@
27/* range e.g. GPIO_1_5 is gpio 5 under linux */ 27/* range e.g. GPIO_1_5 is gpio 5 under linux */
28#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) 28#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr))
29 29
30/* use gpiolib dispatchers */
31#define __ARM_GPIOLIB_TRIVIAL
32
33#define gpio_to_irq(gpio) (MXC_GPIO_IRQ_START + (gpio)) 30#define gpio_to_irq(gpio) (MXC_GPIO_IRQ_START + (gpio))
34#define irq_to_gpio(irq) ((irq) - MXC_GPIO_IRQ_START) 31#define irq_to_gpio(irq) ((irq) - MXC_GPIO_IRQ_START)
35 32
diff --git a/arch/arm/plat-nomadik/include/plat/gpio.h b/arch/arm/plat-nomadik/include/plat/gpio.h
index d2c4290317d9..b894a531f324 100644
--- a/arch/arm/plat-nomadik/include/plat/gpio.h
+++ b/arch/arm/plat-nomadik/include/plat/gpio.h
@@ -14,8 +14,6 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16 16
17#define __ARM_GPIOLIB_TRIVIAL
18
19/* 17/*
20 * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving 18 * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
21 * the "gpio" namespace for generic and cross-machine functions 19 * the "gpio" namespace for generic and cross-machine functions
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h
index f1fdfa5a9cf8..9e86ee0aed0a 100644
--- a/arch/arm/plat-omap/include/plat/gpio.h
+++ b/arch/arm/plat-omap/include/plat/gpio.h
@@ -222,8 +222,6 @@ extern void omap_gpio_restore_context(void);
222#include <linux/errno.h> 222#include <linux/errno.h>
223#include <asm-generic/gpio.h> 223#include <asm-generic/gpio.h>
224 224
225#define __ARM_GPIOLIB_TRIVIAL
226
227static inline int irq_to_gpio(unsigned irq) 225static inline int irq_to_gpio(unsigned irq)
228{ 226{
229 int tmp; 227 int tmp;
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h
index 985c197aecc3..f7d76308603f 100644
--- a/arch/arm/plat-orion/include/plat/gpio.h
+++ b/arch/arm/plat-orion/include/plat/gpio.h
@@ -13,8 +13,6 @@
13 13
14#include <linux/init.h> 14#include <linux/init.h>
15 15
16#define __ARM_GPIOLIB_TRIVIAL
17
18/* 16/*
19 * Orion-specific GPIO API extensions. 17 * Orion-specific GPIO API extensions.
20 */ 18 */
diff --git a/arch/arm/plat-pxa/include/plat/gpio.h b/arch/arm/plat-pxa/include/plat/gpio.h
index 1ddd2b97a729..6fc41db93e1c 100644
--- a/arch/arm/plat-pxa/include/plat/gpio.h
+++ b/arch/arm/plat-pxa/include/plat/gpio.h
@@ -1,6 +1,8 @@
1#ifndef __PLAT_GPIO_H 1#ifndef __PLAT_GPIO_H
2#define __PLAT_GPIO_H 2#define __PLAT_GPIO_H
3 3
4#define __ARM_GPIOLIB_COMPLEX
5
4struct irq_data; 6struct irq_data;
5 7
6/* 8/*
diff --git a/arch/arm/plat-spear/include/plat/gpio.h b/arch/arm/plat-spear/include/plat/gpio.h
index 22d9e0fc1fcc..40a8c178f10d 100644
--- a/arch/arm/plat-spear/include/plat/gpio.h
+++ b/arch/arm/plat-spear/include/plat/gpio.h
@@ -1,19 +1 @@
1/* /* empty */
2 * arch/arm/plat-spear/include/plat/gpio.h
3 *
4 * GPIO macros for SPEAr platform
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __PLAT_GPIO_H
15#define __PLAT_GPIO_H
16
17#define __ARM_GPIOLIB_TRIVIAL
18
19#endif /* __PLAT_GPIO_H */