diff options
Diffstat (limited to 'include/linux/gpio.h')
| -rw-r--r-- | include/linux/gpio.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 17b5a0d80e42..38ac48b7d3a8 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
| @@ -14,6 +14,18 @@ | |||
| 14 | #define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW) | 14 | #define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW) |
| 15 | #define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH) | 15 | #define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH) |
| 16 | 16 | ||
| 17 | /** | ||
| 18 | * struct gpio - a structure describing a GPIO with configuration | ||
| 19 | * @gpio: the GPIO number | ||
| 20 | * @flags: GPIO configuration as specified by GPIOF_* | ||
| 21 | * @label: a literal description string of this GPIO | ||
| 22 | */ | ||
| 23 | struct gpio { | ||
| 24 | unsigned gpio; | ||
| 25 | unsigned long flags; | ||
| 26 | const char *label; | ||
| 27 | }; | ||
| 28 | |||
| 17 | #ifdef CONFIG_GENERIC_GPIO | 29 | #ifdef CONFIG_GENERIC_GPIO |
| 18 | #include <asm/gpio.h> | 30 | #include <asm/gpio.h> |
| 19 | 31 | ||
| @@ -24,18 +36,8 @@ | |||
| 24 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
| 25 | 37 | ||
| 26 | struct device; | 38 | struct device; |
| 27 | struct gpio; | ||
| 28 | struct gpio_chip; | 39 | struct gpio_chip; |
| 29 | 40 | ||
| 30 | /* | ||
| 31 | * Some platforms don't support the GPIO programming interface. | ||
| 32 | * | ||
| 33 | * In case some driver uses it anyway (it should normally have | ||
| 34 | * depended on GENERIC_GPIO), these routines help the compiler | ||
| 35 | * optimize out much GPIO-related code ... or trigger a runtime | ||
| 36 | * warning when something is wrongly called. | ||
| 37 | */ | ||
| 38 | |||
| 39 | static inline bool gpio_is_valid(int number) | 41 | static inline bool gpio_is_valid(int number) |
| 40 | { | 42 | { |
| 41 | return false; | 43 | return false; |
