1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[rdc] convert gpio code to use gpiolib, make rdc321x:dmz led work again

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18754 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian
2009-12-11 19:32:52 +00:00
parent 4619273d77
commit 51528b3785
5 changed files with 44 additions and 122 deletions

View File

@@ -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>