From 1d6c42df96154e859a0c02ec578780cb2948bb43 Mon Sep 17 00:00:00 2001 From: hauke Date: Sat, 4 Aug 2012 19:46:25 +0000 Subject: brcm47xx: use libgpio instaed of implementing the gpio interface ourself. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32992 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-3.3/220-add_gpio_request_one.patch | 51 ---------------------- 1 file changed, 51 deletions(-) delete mode 100644 target/linux/brcm47xx/patches-3.3/220-add_gpio_request_one.patch (limited to 'target/linux/brcm47xx/patches-3.3/220-add_gpio_request_one.patch') diff --git a/target/linux/brcm47xx/patches-3.3/220-add_gpio_request_one.patch b/target/linux/brcm47xx/patches-3.3/220-add_gpio_request_one.patch deleted file mode 100644 index 00005e2d5..000000000 --- a/target/linux/brcm47xx/patches-3.3/220-add_gpio_request_one.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/arch/mips/bcm47xx/gpio.c -+++ b/arch/mips/bcm47xx/gpio.c -@@ -7,6 +7,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -100,3 +101,30 @@ int gpio_to_irq(unsigned gpio) - return -EINVAL; - } - EXPORT_SYMBOL_GPL(gpio_to_irq); -+ -+/** -+ * gpio_request_one - request a single GPIO with initial configuration -+ * @gpio: the GPIO number -+ * @flags: GPIO configuration as specified by GPIOF_* -+ * @label: a literal description string of this GPIO -+ */ -+int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) -+{ -+ int err; -+ -+ err = gpio_request(gpio, label); -+ if (err) -+ return err; -+ -+ if (flags & GPIOF_DIR_IN) -+ err = gpio_direction_input(gpio); -+ else -+ err = gpio_direction_output(gpio, -+ (flags & GPIOF_INIT_HIGH) ? 1 : 0); -+ -+ if (err) -+ gpio_free(gpio); -+ -+ return err; -+} -+EXPORT_SYMBOL_GPL(gpio_request_one); ---- a/arch/mips/include/asm/mach-bcm47xx/gpio.h -+++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h -@@ -19,6 +19,7 @@ - extern int gpio_request(unsigned gpio, const char *label); - extern void gpio_free(unsigned gpio); - extern int gpio_to_irq(unsigned gpio); -+extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); - - static inline int gpio_get_value(unsigned gpio) - { -- cgit v1.2.3