diff options
Diffstat (limited to 'include/linux/gpio.h')
| -rw-r--r-- | include/linux/gpio.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index e41f7dd1ae6..f79d67f413e 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
| 14 | 14 | ||
| 15 | struct device; | 15 | struct device; |
| 16 | struct gpio; | ||
| 16 | struct gpio_chip; | 17 | struct gpio_chip; |
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| @@ -29,7 +30,18 @@ static inline int gpio_is_valid(int number) | |||
| 29 | return 0; | 30 | return 0; |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | static inline int gpio_request(unsigned gpio, const char *label) | 33 | static inline int __must_check gpio_request(unsigned gpio, const char *label) |
| 34 | { | ||
| 35 | return -ENOSYS; | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline int __must_check gpio_request_one(unsigned gpio, | ||
| 39 | unsigned long flags, const char *label) | ||
| 40 | { | ||
| 41 | return -ENOSYS; | ||
| 42 | } | ||
| 43 | |||
| 44 | static inline int __must_check gpio_request_array(struct gpio *array, size_t num) | ||
| 33 | { | 45 | { |
| 34 | return -ENOSYS; | 46 | return -ENOSYS; |
| 35 | } | 47 | } |
| @@ -42,12 +54,20 @@ static inline void gpio_free(unsigned gpio) | |||
| 42 | WARN_ON(1); | 54 | WARN_ON(1); |
| 43 | } | 55 | } |
| 44 | 56 | ||
| 45 | static inline int gpio_direction_input(unsigned gpio) | 57 | static inline void gpio_free_array(struct gpio *array, size_t num) |
| 58 | { | ||
| 59 | might_sleep(); | ||
| 60 | |||
| 61 | /* GPIO can never have been requested */ | ||
| 62 | WARN_ON(1); | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline int __must_check gpio_direction_input(unsigned gpio) | ||
| 46 | { | 66 | { |
| 47 | return -ENOSYS; | 67 | return -ENOSYS; |
| 48 | } | 68 | } |
| 49 | 69 | ||
| 50 | static inline int gpio_direction_output(unsigned gpio, int value) | 70 | static inline int __must_check gpio_direction_output(unsigned gpio, int value) |
| 51 | { | 71 | { |
| 52 | return -ENOSYS; | 72 | return -ENOSYS; |
| 53 | } | 73 | } |
