tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / arch / arm64 / include / asm / gpio.h
1 #ifndef _ARCH_ARM_GPIO_H
2 #define _ARCH_ARM_GPIO_H
3
4 #if CONFIG_ARCH_NR_GPIO > 0
5 #define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
6 #endif
7
8 /* not all ARM platforms necessarily support this API ... */
9 #ifdef CONFIG_NEED_MACH_GPIO_H
10 #ifdef CONFIG_64BIT
11 #include <soc/sprd/gpio.h>
12 #else
13 #include <mach/gpio.h>
14 #endif
15 #endif
16
17 #ifndef __ARM_GPIOLIB_COMPLEX
18 /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
19 #include <asm-generic/gpio.h>
20
21 /* The trivial gpiolib dispatchers */
22 #define gpio_get_value  __gpio_get_value
23 #define gpio_set_value  __gpio_set_value
24 #define gpio_cansleep   __gpio_cansleep
25 #endif
26
27 /*
28  * Provide a default gpio_to_irq() which should satisfy every case.
29  * However, some platforms want to do this differently, so allow them
30  * to override it.
31  */
32 #ifndef gpio_to_irq
33 #define gpio_to_irq     __gpio_to_irq
34 #endif
35
36 #endif /* _ARCH_ARM_GPIO_H */