Committer: Michael Beasley <mike@snafu.setup>
[mikesnafu-overlay.git] / include / asm-x86 / mach-rdc321x / gpio.h
blobacce0b7d397bb2465ee89beb6e8a7d817bccbc7a
1 #ifndef _RDC321X_GPIO_H
2 #define _RDC321X_GPIO_H
4 extern int rdc_gpio_get_value(unsigned gpio);
5 extern void rdc_gpio_set_value(unsigned gpio, int value);
6 extern int rdc_gpio_direction_input(unsigned gpio);
7 extern int rdc_gpio_direction_output(unsigned gpio, int value);
8 extern int rdc_gpio_request(unsigned gpio, const char *label);
9 extern void rdc_gpio_free(unsigned gpio);
10 extern void __init rdc321x_gpio_setup(void);
12 /* Wrappers for the arch-neutral GPIO API */
14 static inline int gpio_request(unsigned gpio, const char *label)
16 return rdc_gpio_request(gpio, label);
19 static inline void gpio_free(unsigned gpio)
21 rdc_gpio_free(gpio);
24 static inline int gpio_direction_input(unsigned gpio)
26 return rdc_gpio_direction_input(gpio);
29 static inline int gpio_direction_output(unsigned gpio, int value)
31 return rdc_gpio_direction_output(gpio, value);
34 static inline int gpio_get_value(unsigned gpio)
36 return rdc_gpio_get_value(gpio);
39 static inline void gpio_set_value(unsigned gpio, int value)
41 rdc_gpio_set_value(gpio, value);
44 static inline int gpio_to_irq(unsigned gpio)
46 return gpio;
49 static inline int irq_to_gpio(unsigned irq)
51 return irq;
54 /* For cansleep */
55 #include <asm-generic/gpio.h>
57 #endif /* _RDC321X_GPIO_H_ */