diff options
Diffstat (limited to 'include/linux/gpio.h')
-rw-r--r-- | include/linux/gpio.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 4987a84078e..730a20b8357 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
@@ -8,6 +8,9 @@ | |||
8 | 8 | ||
9 | #else | 9 | #else |
10 | 10 | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/errno.h> | ||
13 | |||
11 | /* | 14 | /* |
12 | * Some platforms don't support the GPIO programming interface. | 15 | * Some platforms don't support the GPIO programming interface. |
13 | * | 16 | * |
@@ -76,6 +79,19 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value) | |||
76 | WARN_ON(1); | 79 | WARN_ON(1); |
77 | } | 80 | } |
78 | 81 | ||
82 | static inline int gpio_export(unsigned gpio, bool direction_may_change) | ||
83 | { | ||
84 | /* GPIO can never have been requested or set as {in,out}put */ | ||
85 | WARN_ON(1); | ||
86 | return -EINVAL; | ||
87 | } | ||
88 | |||
89 | static inline void gpio_unexport(unsigned gpio) | ||
90 | { | ||
91 | /* GPIO can never have been exported */ | ||
92 | WARN_ON(1); | ||
93 | } | ||
94 | |||
79 | static inline int gpio_to_irq(unsigned gpio) | 95 | static inline int gpio_to_irq(unsigned gpio) |
80 | { | 96 | { |
81 | /* GPIO can never have been requested or set as input */ | 97 | /* GPIO can never have been requested or set as input */ |