Lines Matching full:gpio

3  * <linux/gpio.h>
5 * This is the LEGACY GPIO bulk include file, including legacy APIs. It is
6 * used for GPIO drivers still referencing the global GPIO numberspace,
9 * If you're implementing a GPIO driver, only include <linux/gpio/driver.h>
10 * If you're implementing a GPIO consumer, only include <linux/gpio/consumer.h>
17 /* see Documentation/driver-api/gpio/legacy.rst */
19 /* make these flag values available regardless of GPIO kconfig options */
30 /* Gpio pin is active-low */
33 /* Gpio pin is open drain */
36 /* Gpio pin is open source */
45 * struct gpio - a structure describing a GPIO with configuration
46 * @gpio: the GPIO number
47 * @flags: GPIO configuration as specified by GPIOF_*
48 * @label: a literal description string of this GPIO
50 struct gpio { struct
51 unsigned gpio; member
59 #include <asm/gpio.h> argument
62 #include <asm-generic/gpio.h>
64 static inline int gpio_get_value(unsigned int gpio) in gpio_get_value() argument
66 return __gpio_get_value(gpio); in gpio_get_value()
69 static inline void gpio_set_value(unsigned int gpio, int value) in gpio_set_value() argument
71 __gpio_set_value(gpio, value); in gpio_set_value()
74 static inline int gpio_cansleep(unsigned int gpio) in gpio_cansleep() argument
76 return __gpio_cansleep(gpio); in gpio_cansleep()
79 static inline int gpio_to_irq(unsigned int gpio) in gpio_to_irq() argument
81 return __gpio_to_irq(gpio); in gpio_to_irq()
95 int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
96 int devm_gpio_request_one(struct device *dev, unsigned gpio,
113 static inline int gpio_request(unsigned gpio, const char *label) in gpio_request() argument
118 static inline int gpio_request_one(unsigned gpio, in gpio_request_one() argument
124 static inline int gpio_request_array(const struct gpio *array, size_t num) in gpio_request_array()
129 static inline void gpio_free(unsigned gpio) in gpio_free() argument
133 /* GPIO can never have been requested */ in gpio_free()
137 static inline void gpio_free_array(const struct gpio *array, size_t num) in gpio_free_array()
141 /* GPIO can never have been requested */ in gpio_free_array()
145 static inline int gpio_direction_input(unsigned gpio) in gpio_direction_input() argument
150 static inline int gpio_direction_output(unsigned gpio, int value) in gpio_direction_output() argument
155 static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) in gpio_set_debounce() argument
160 static inline int gpio_get_value(unsigned gpio) in gpio_get_value() argument
162 /* GPIO can never have been requested or set as {in,out}put */ in gpio_get_value()
167 static inline void gpio_set_value(unsigned gpio, int value) in gpio_set_value() argument
169 /* GPIO can never have been requested or set as output */ in gpio_set_value()
173 static inline int gpio_cansleep(unsigned gpio) in gpio_cansleep() argument
175 /* GPIO can never have been requested or set as {in,out}put */ in gpio_cansleep()
180 static inline int gpio_get_value_cansleep(unsigned gpio) in gpio_get_value_cansleep() argument
182 /* GPIO can never have been requested or set as {in,out}put */ in gpio_get_value_cansleep()
187 static inline void gpio_set_value_cansleep(unsigned gpio, int value) in gpio_set_value_cansleep() argument
189 /* GPIO can never have been requested or set as output */ in gpio_set_value_cansleep()
193 static inline int gpio_export(unsigned gpio, bool direction_may_change) in gpio_export() argument
195 /* GPIO can never have been requested or set as {in,out}put */ in gpio_export()
201 unsigned gpio) in gpio_export_link() argument
203 /* GPIO can never have been exported */ in gpio_export_link()
208 static inline void gpio_unexport(unsigned gpio) in gpio_unexport() argument
210 /* GPIO can never have been exported */ in gpio_unexport()
214 static inline int gpio_to_irq(unsigned gpio) in gpio_to_irq() argument
216 /* GPIO can never have been requested or set as input */ in gpio_to_irq()
228 static inline int devm_gpio_request(struct device *dev, unsigned gpio, in devm_gpio_request() argument
235 static inline int devm_gpio_request_one(struct device *dev, unsigned gpio, in devm_gpio_request_one() argument