tizen 2.4 release
[kernel/u-boot-tm1.git] / include / linux / gpio.h
1 #ifndef __LINUX_GPIO_H
2 #define __LINUX_GPIO_H
3
4 /* see Documentation/gpio.txt */
5
6 /* make these flag values available regardless of GPIO kconfig options */
7 #define GPIOF_DIR_OUT   (0 << 0)
8 #define GPIOF_DIR_IN    (1 << 0)
9
10 #define GPIOF_INIT_LOW  (0 << 1)
11 #define GPIOF_INIT_HIGH (1 << 1)
12
13 #define GPIOF_IN                (GPIOF_DIR_IN)
14 #define GPIOF_OUT_INIT_LOW      (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
15 #define GPIOF_OUT_INIT_HIGH     (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
16
17 /* Gpio pin is open drain */
18 #define GPIOF_OPEN_DRAIN        (1 << 2)
19
20 /* Gpio pin is open source */
21 #define GPIOF_OPEN_SOURCE       (1 << 3)
22
23 /**
24  * struct gpio - a structure describing a GPIO with configuration
25  * @gpio:       the GPIO number
26  * @flags:      GPIO configuration as specified by GPIOF_*
27  * @label:      a literal description string of this GPIO
28  */
29 struct gpio {
30         unsigned        gpio;
31         unsigned long   flags;
32         const char      *label;
33 };
34
35 #include <asm-generic/gpio.h>
36
37 #endif /* __LINUX_GPIO_H */