4 /* see Documentation/gpio.txt */
6 #ifdef CONFIG_GENERIC_GPIO
11 #include <linux/kernel.h>
12 #include <linux/types.h>
13 #include <linux/errno.h>
16 * Some platforms don't support the GPIO programming interface.
18 * In case some driver uses it anyway (it should normally have
19 * depended on GENERIC_GPIO), these routines help the compiler
20 * optimize out much GPIO-related code ... or trigger a runtime
21 * warning when something is wrongly called.
24 static inline int gpio_is_valid(int number
)
29 static inline int gpio_request(unsigned gpio
, const char *label
)
34 static inline void gpio_free(unsigned gpio
)
38 /* GPIO can never have been requested */
42 static inline int gpio_direction_input(unsigned gpio
)
47 static inline int gpio_direction_output(unsigned gpio
, int value
)
52 static inline int gpio_get_value(unsigned gpio
)
54 /* GPIO can never have been requested or set as {in,out}put */
59 static inline void gpio_set_value(unsigned gpio
, int value
)
61 /* GPIO can never have been requested or set as output */
65 static inline int gpio_cansleep(unsigned gpio
)
67 /* GPIO can never have been requested or set as {in,out}put */
72 static inline int gpio_get_value_cansleep(unsigned gpio
)
74 /* GPIO can never have been requested or set as {in,out}put */
79 static inline void gpio_set_value_cansleep(unsigned gpio
, int value
)
81 /* GPIO can never have been requested or set as output */
85 static inline int gpio_export(unsigned gpio
, bool direction_may_change
)
87 /* GPIO can never have been requested or set as {in,out}put */
92 static inline void gpio_unexport(unsigned gpio
)
94 /* GPIO can never have been exported */
98 static inline int gpio_to_irq(unsigned gpio
)
100 /* GPIO can never have been requested or set as input */
105 static inline int irq_to_gpio(unsigned irq
)
107 /* irq can never have been returned from gpio_to_irq() */
114 #endif /* __LINUX_GPIO_H */
This page took 0.032029 seconds and 5 git commands to generate.