]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - include/asm-x86/mach-rdc321x/gpio.h
leds/acpi: Fix merge fallout from acpi_driver_data change
[linux-2.6-omap-h63xx.git] / include / asm-x86 / mach-rdc321x / gpio.h
1 #ifndef ASM_X86__MACH_RDC321X__GPIO_H
2 #define ASM_X86__MACH_RDC321X__GPIO_H
3
4 #include <linux/kernel.h>
5
6 extern int rdc_gpio_get_value(unsigned gpio);
7 extern void rdc_gpio_set_value(unsigned gpio, int value);
8 extern int rdc_gpio_direction_input(unsigned gpio);
9 extern int rdc_gpio_direction_output(unsigned gpio, int value);
10 extern int rdc_gpio_request(unsigned gpio, const char *label);
11 extern void rdc_gpio_free(unsigned gpio);
12 extern void __init rdc321x_gpio_setup(void);
13
14 /* Wrappers for the arch-neutral GPIO API */
15
16 static inline int gpio_request(unsigned gpio, const char *label)
17 {
18         return rdc_gpio_request(gpio, label);
19 }
20
21 static inline void gpio_free(unsigned gpio)
22 {
23         might_sleep();
24         rdc_gpio_free(gpio);
25 }
26
27 static inline int gpio_direction_input(unsigned gpio)
28 {
29         return rdc_gpio_direction_input(gpio);
30 }
31
32 static inline int gpio_direction_output(unsigned gpio, int value)
33 {
34         return rdc_gpio_direction_output(gpio, value);
35 }
36
37 static inline int gpio_get_value(unsigned gpio)
38 {
39         return rdc_gpio_get_value(gpio);
40 }
41
42 static inline void gpio_set_value(unsigned gpio, int value)
43 {
44         rdc_gpio_set_value(gpio, value);
45 }
46
47 static inline int gpio_to_irq(unsigned gpio)
48 {
49         return gpio;
50 }
51
52 static inline int irq_to_gpio(unsigned irq)
53 {
54         return irq;
55 }
56
57 /* For cansleep */
58 #include <asm-generic/gpio.h>
59
60 #endif /* ASM_X86__MACH_RDC321X__GPIO_H */