aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/gpio.h')
-rw-r--r--include/linux/gpio.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 98be6c5762b9..e10c49a5b96e 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -8,6 +8,7 @@
8 8
9#else 9#else
10 10
11#include <linux/kernel.h>
11#include <linux/types.h> 12#include <linux/types.h>
12#include <linux/errno.h> 13#include <linux/errno.h>
13 14
@@ -32,6 +33,8 @@ static inline int gpio_request(unsigned gpio, const char *label)
32 33
33static inline void gpio_free(unsigned gpio) 34static inline void gpio_free(unsigned gpio)
34{ 35{
36 might_sleep();
37
35 /* GPIO can never have been requested */ 38 /* GPIO can never have been requested */
36 WARN_ON(1); 39 WARN_ON(1);
37} 40}
@@ -79,6 +82,19 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
79 WARN_ON(1); 82 WARN_ON(1);
80} 83}
81 84
85static inline int gpio_export(unsigned gpio, bool direction_may_change)
86{
87 /* GPIO can never have been requested or set as {in,out}put */
88 WARN_ON(1);
89 return -EINVAL;
90}
91
92static inline void gpio_unexport(unsigned gpio)
93{
94 /* GPIO can never have been exported */
95 WARN_ON(1);
96}
97
82static inline int gpio_to_irq(unsigned gpio) 98static inline int gpio_to_irq(unsigned gpio)
83{ 99{
84 /* GPIO can never have been requested or set as input */ 100 /* GPIO can never have been requested or set as input */