diff options
author | Florian Fainelli <florian@openwrt.org> | 2009-12-11 19:32:52 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2009-12-11 19:32:52 +0000 |
commit | 95fa0702028d0aa0ffb625e5fd08e90d76d4290f (patch) | |
tree | 2f710a04a13f48f68c38350ff99f77bdf317dc24 /target/linux/rdc/files-2.6.30/arch/x86/include | |
parent | 0992bb916aa13163e33b01d791fe4bc990f88542 (diff) | |
download | mtk-20170518-95fa0702028d0aa0ffb625e5fd08e90d76d4290f.zip mtk-20170518-95fa0702028d0aa0ffb625e5fd08e90d76d4290f.tar.gz mtk-20170518-95fa0702028d0aa0ffb625e5fd08e90d76d4290f.tar.bz2 |
convert gpio code to use gpiolib, make rdc321x:dmz led work again
SVN-Revision: 18754
Diffstat (limited to 'target/linux/rdc/files-2.6.30/arch/x86/include')
-rw-r--r-- | target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h b/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h index 873bffe..adb75af 100644 --- a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h +++ b/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h @@ -3,55 +3,12 @@ #include <linux/kernel.h> -extern int rdc_gpio_get_value(unsigned gpio); -extern void rdc_gpio_set_value(unsigned gpio, int value); -extern int rdc_gpio_direction_input(unsigned gpio); -extern int rdc_gpio_direction_output(unsigned gpio, int value); -extern int rdc_gpio_request(unsigned gpio, const char *label); -extern void rdc_gpio_free(unsigned gpio); +#define gpio_to_irq(gpio) NULL -/* Wrappers for the arch-neutral GPIO API */ +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value -static inline int gpio_request(unsigned gpio, const char *label) -{ - return rdc_gpio_request(gpio, label); -} - -static inline void gpio_free(unsigned gpio) -{ - might_sleep(); - rdc_gpio_free(gpio); -} - -static inline int gpio_direction_input(unsigned gpio) -{ - return rdc_gpio_direction_input(gpio); -} - -static inline int gpio_direction_output(unsigned gpio, int value) -{ - return rdc_gpio_direction_output(gpio, value); -} - -static inline int gpio_get_value(unsigned gpio) -{ - return rdc_gpio_get_value(gpio); -} - -static inline void gpio_set_value(unsigned gpio, int value) -{ - rdc_gpio_set_value(gpio, value); -} - -static inline int gpio_to_irq(unsigned gpio) -{ - return gpio; -} - -static inline int irq_to_gpio(unsigned irq) -{ - return irq; -} +#define gpio_cansleep __gpio_cansleep /* For cansleep */ #include <asm-generic/gpio.h> |