]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: plat-iop: remove custom complex GPIO implementation
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 9 Sep 2013 14:07:42 +0000 (16:07 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 20 Sep 2013 21:04:41 +0000 (23:04 +0200)
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>
arch/arm/include/asm/hardware/iop3xx-gpio.h
arch/arm/include/asm/hardware/iop3xx.h
drivers/gpio/gpio-iop.c

index 9eda7dc92ad8d79c2214ac1ba472fa9e29c2357f..e2a097078a06d23a54985e7c1f5a41a8f1af57d9 100644 (file)
 #include <mach/hardware.h>
 #include <asm-generic/gpio.h>
 
-#define __ARM_GPIOLIB_COMPLEX
-
-#define IOP3XX_N_GPIOS 8
-
-static inline int gpio_get_value(unsigned gpio)
-{
-       if (gpio > IOP3XX_N_GPIOS)
-               return __gpio_get_value(gpio);
-
-       return gpio_line_get(gpio);
-}
-
-static inline void gpio_set_value(unsigned gpio, int value)
-{
-       if (gpio > IOP3XX_N_GPIOS) {
-               __gpio_set_value(gpio, value);
-               return;
-       }
-       gpio_line_set(gpio, value);
-}
-
-static inline int gpio_cansleep(unsigned gpio)
-{
-       if (gpio < IOP3XX_N_GPIOS)
-               return 0;
-       else
-               return __gpio_cansleep(gpio);
-}
-
-/*
- * The GPIOs are not generating any interrupt
- * Note : manuals are not clear about this
- */
-static inline int gpio_to_irq(int gpio)
-{
-       return -EINVAL;
-}
-
-static inline int irq_to_gpio(int gpio)
-{
-       return -EINVAL;
-}
-
 #endif
 
index 423744bf18ebe96b035433146ea26c097e2c963d..6af9c2841fcb5d16ee7c23f0637458bf9310f8cd 100644 (file)
@@ -25,9 +25,6 @@
 #define IOP3XX_GPIO_LINE(x)    (x)
 
 #ifndef __ASSEMBLY__
-extern void gpio_line_config(int line, int direction);
-extern int  gpio_line_get(int line);
-extern void gpio_line_set(int line, int value);
 extern int init_atu;
 extern int iop3xx_get_init_atu(void);
 #endif
index d4a170dfe5048b55efc1fa188e77495d5a0c76ef..17cc7010cd04388540ce9eeff720dbc2bcc286fe 100644 (file)
@@ -19,7 +19,7 @@
 
 #define IOP3XX_N_GPIOS 8
 
-void gpio_line_config(int line, int direction)
+static void gpio_line_config(int line, int direction)
 {
        unsigned long flags;
 
@@ -31,15 +31,13 @@ void gpio_line_config(int line, int direction)
        }
        local_irq_restore(flags);
 }
-EXPORT_SYMBOL(gpio_line_config);
 
-int gpio_line_get(int line)
+static int gpio_line_get(int line)
 {
        return !!(*IOP3XX_GPID & (1 << line));
 }
-EXPORT_SYMBOL(gpio_line_get);
 
-void gpio_line_set(int line, int value)
+static void gpio_line_set(int line, int value)
 {
        unsigned long flags;
 
@@ -51,7 +49,6 @@ void gpio_line_set(int line, int value)
        }
        local_irq_restore(flags);
 }
-EXPORT_SYMBOL(gpio_line_set);
 
 static int iop3xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
 {