diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-01-12 20:00:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:15 -0500 |
commit | 5f829e405ec4e96f711165a4a7b55c271d4363e2 (patch) | |
tree | 366c02d4d085a486546b1e071efdd51f161b2267 /include/linux/gpio.h | |
parent | 0fdae42d361bbb431ca0ab0efed5126a94821177 (diff) |
gpiolib: add missing functions to generic fallback
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/gpio.h')
-rw-r--r-- | include/linux/gpio.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 1d5214a89110..f79d67f413e4 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 | /* |
@@ -34,6 +35,17 @@ static inline int __must_check gpio_request(unsigned gpio, const char *label) | |||
34 | return -ENOSYS; | 35 | return -ENOSYS; |
35 | } | 36 | } |
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) | ||
45 | { | ||
46 | return -ENOSYS; | ||
47 | } | ||
48 | |||
37 | static inline void gpio_free(unsigned gpio) | 49 | static inline void gpio_free(unsigned gpio) |
38 | { | 50 | { |
39 | might_sleep(); | 51 | might_sleep(); |
@@ -42,6 +54,14 @@ static inline void gpio_free(unsigned gpio) | |||
42 | WARN_ON(1); | 54 | WARN_ON(1); |
43 | } | 55 | } |
44 | 56 | ||
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 | |||
45 | static inline int __must_check gpio_direction_input(unsigned gpio) | 65 | static inline int __must_check gpio_direction_input(unsigned gpio) |
46 | { | 66 | { |
47 | return -ENOSYS; | 67 | return -ENOSYS; |