rdc321x: GPIO routines bugfixes
[deliverable/linux.git] / include / asm-x86 / mach-rdc321x / gpio.h
CommitLineData
5e3a77e9
FF
1#ifndef _RDC321X_GPIO_H
2#define _RDC321X_GPIO_H
3
4extern int rdc_gpio_get_value(unsigned gpio);
5extern void rdc_gpio_set_value(unsigned gpio, int value);
6extern int rdc_gpio_direction_input(unsigned gpio);
7extern int rdc_gpio_direction_output(unsigned gpio, int value);
b2ef7497
FF
8extern int rdc_gpio_request(unsigned gpio, const char *label);
9extern void rdc_gpio_free(unsigned gpio);
10extern void __init rdc321x_gpio_setup(void);
5e3a77e9
FF
11
12/* Wrappers for the arch-neutral GPIO API */
13
14static inline int gpio_request(unsigned gpio, const char *label)
15{
b2ef7497 16 return rdc_gpio_request(gpio, label);
5e3a77e9
FF
17}
18
19static inline void gpio_free(unsigned gpio)
20{
b2ef7497 21 rdc_gpio_free(gpio);
5e3a77e9
FF
22}
23
24static inline int gpio_direction_input(unsigned gpio)
25{
26 return rdc_gpio_direction_input(gpio);
27}
28
29static inline int gpio_direction_output(unsigned gpio, int value)
30{
31 return rdc_gpio_direction_output(gpio, value);
32}
33
34static inline int gpio_get_value(unsigned gpio)
35{
36 return rdc_gpio_get_value(gpio);
37}
38
39static inline void gpio_set_value(unsigned gpio, int value)
40{
41 rdc_gpio_set_value(gpio, value);
42}
43
44static inline int gpio_to_irq(unsigned gpio)
45{
46 return gpio;
47}
48
49static inline int irq_to_gpio(unsigned irq)
50{
51 return irq;
52}
53
54/* For cansleep */
55#include <asm-generic/gpio.h>
56
57#endif /* _RDC321X_GPIO_H_ */
This page took 0.060216 seconds and 5 git commands to generate.