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
)
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
)
49 static inline int irq_to_gpio(unsigned irq
)
55 #include <asm-generic/gpio.h>
57 #endif /* _RDC321X_GPIO_H_ */