Linux 2.6.25.20
[linux/fpc-iii.git] / include / asm-mips / mach-au1x00 / gpio.h
blob2dc61e009a08e4d416b966322044d227222ff701
1 #ifndef _AU1XXX_GPIO_H_
2 #define _AU1XXX_GPIO_H_
4 #include <linux/types.h>
6 #define AU1XXX_GPIO_BASE 200
8 struct au1x00_gpio2 {
9 u32 dir;
10 u32 reserved;
11 u32 output;
12 u32 pinstate;
13 u32 inten;
14 u32 enable;
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 */
28 return 0;
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)
58 return gpio;
61 static inline int irq_to_gpio(unsigned irq)
63 return irq;
66 /* For cansleep */
67 #include <asm-generic/gpio.h>
69 #endif /* _AU1XXX_GPIO_H_ */