1 #ifndef _AU1XXX_GPIO_H_
2 #define _AU1XXX_GPIO_H_
4 #include <linux/types.h>
6 #define AU1XXX_GPIO_BASE 200
17 extern int au1xxx_gpio_get_value(unsigned gpio);
18 extern void au1xxx_gpio_set_value(unsigned gpio, int value);
19 extern int au1xxx_gpio_direction_input(unsigned gpio);
20 extern int au1xxx_gpio_direction_output(unsigned gpio, int value);
23 /* Wrappers for the arch-neutral GPIO API */
25 static inline int gpio_request(unsigned gpio, const char *label)
27 /* Not yet implemented */
31 static inline void gpio_free(unsigned gpio)
33 /* Not yet implemented */
36 static inline int gpio_direction_input(unsigned gpio)
38 return au1xxx_gpio_direction_input(gpio);
41 static inline int gpio_direction_output(unsigned gpio, int value)
43 return au1xxx_gpio_direction_output(gpio, value);
46 static inline int gpio_get_value(unsigned gpio)
48 return au1xxx_gpio_get_value(gpio);
51 static inline void gpio_set_value(unsigned gpio, int value)
53 au1xxx_gpio_set_value(gpio, value);
56 static inline int gpio_to_irq(unsigned gpio)
61 static inline int irq_to_gpio(unsigned irq)
67 #include <asm-generic/gpio.h>
69 #endif /* _AU1XXX_GPIO_H_ */