aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-09-09 10:07:42 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-09-20 17:04:41 -0400
commit51a97d829e32b7a1b960d3365e4c2546c9c792aa (patch)
treea86d558d885a5276fd4a0ff1b8729d4ea11424d3
parentf6ffa5ee039cd0168d82e3edd712ebbb1de93a00 (diff)
ARM: plat-iop: remove custom complex GPIO implementation
The kernel will now only use gpiolib to access GPIOs, so remove the complex GPIO flag and the custom implementation. Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/include/asm/hardware/iop3xx-gpio.h43
-rw-r--r--arch/arm/include/asm/hardware/iop3xx.h3
-rw-r--r--drivers/gpio/gpio-iop.c9
3 files changed, 3 insertions, 52 deletions
diff --git a/arch/arm/include/asm/hardware/iop3xx-gpio.h b/arch/arm/include/asm/hardware/iop3xx-gpio.h
index 9eda7dc92ad8..e2a097078a06 100644
--- a/arch/arm/include/asm/hardware/iop3xx-gpio.h
+++ b/arch/arm/include/asm/hardware/iop3xx-gpio.h
@@ -28,48 +28,5 @@
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
33#define IOP3XX_N_GPIOS 8
34
35static inline int gpio_get_value(unsigned gpio)
36{
37 if (gpio > IOP3XX_N_GPIOS)
38 return __gpio_get_value(gpio);
39
40 return gpio_line_get(gpio);
41}
42
43static inline void gpio_set_value(unsigned gpio, int value)
44{
45 if (gpio > IOP3XX_N_GPIOS) {
46 __gpio_set_value(gpio, value);
47 return;
48 }
49 gpio_line_set(gpio, value);
50}
51
52static inline int gpio_cansleep(unsigned gpio)
53{
54 if (gpio < IOP3XX_N_GPIOS)
55 return 0;
56 else
57 return __gpio_cansleep(gpio);
58}
59
60/*
61 * The GPIOs are not generating any interrupt
62 * Note : manuals are not clear about this
63 */
64static inline int gpio_to_irq(int gpio)
65{
66 return -EINVAL;
67}
68
69static inline int irq_to_gpio(int gpio)
70{
71 return -EINVAL;
72}
73
74#endif 31#endif
75 32
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h
index 423744bf18eb..6af9c2841fcb 100644
--- a/arch/arm/include/asm/hardware/iop3xx.h
+++ b/arch/arm/include/asm/hardware/iop3xx.h
@@ -25,9 +25,6 @@
25#define IOP3XX_GPIO_LINE(x) (x) 25#define IOP3XX_GPIO_LINE(x) (x)
26 26
27#ifndef __ASSEMBLY__ 27#ifndef __ASSEMBLY__
28extern void gpio_line_config(int line, int direction);
29extern int gpio_line_get(int line);
30extern void gpio_line_set(int line, int value);
31extern int init_atu; 28extern int init_atu;
32extern int iop3xx_get_init_atu(void); 29extern int iop3xx_get_init_atu(void);
33#endif 30#endif
diff --git a/drivers/gpio/gpio-iop.c b/drivers/gpio/gpio-iop.c
index d4a170dfe504..17cc7010cd04 100644
--- a/drivers/gpio/gpio-iop.c
+++ b/drivers/gpio/gpio-iop.c
@@ -19,7 +19,7 @@
19 19
20#define IOP3XX_N_GPIOS 8 20#define IOP3XX_N_GPIOS 8
21 21
22void gpio_line_config(int line, int direction) 22static void gpio_line_config(int line, int direction)
23{ 23{
24 unsigned long flags; 24 unsigned long flags;
25 25
@@ -31,15 +31,13 @@ void gpio_line_config(int line, int direction)
31 } 31 }
32 local_irq_restore(flags); 32 local_irq_restore(flags);
33} 33}
34EXPORT_SYMBOL(gpio_line_config);
35 34
36int gpio_line_get(int line) 35static int gpio_line_get(int line)
37{ 36{
38 return !!(*IOP3XX_GPID & (1 << line)); 37 return !!(*IOP3XX_GPID & (1 << line));
39} 38}
40EXPORT_SYMBOL(gpio_line_get);
41 39
42void gpio_line_set(int line, int value) 40static void gpio_line_set(int line, int value)
43{ 41{
44 unsigned long flags; 42 unsigned long flags;
45 43
@@ -51,7 +49,6 @@ void gpio_line_set(int line, int value)
51 } 49 }
52 local_irq_restore(flags); 50 local_irq_restore(flags);
53} 51}
54EXPORT_SYMBOL(gpio_line_set);
55 52
56static int iop3xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 53static int iop3xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
57{ 54{