Lines Matching +full:int +full:- +full:gpios
1 // SPDX-License-Identifier: GPL-2.0
16 * gpio_request_one - request a single GPIO with initial configuration
21 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) in gpio_request_one()
24 int err; in gpio_request_one()
28 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request_one()
30 return -EPROBE_DEFER; in gpio_request_one()
37 set_bit(FLAG_OPEN_DRAIN, &desc->flags); in gpio_request_one()
40 set_bit(FLAG_OPEN_SOURCE, &desc->flags); in gpio_request_one()
43 set_bit(FLAG_ACTIVE_LOW, &desc->flags); in gpio_request_one()
68 int gpio_request(unsigned gpio, const char *label) in gpio_request()
72 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request()
74 return -EPROBE_DEFER; in gpio_request()
81 * gpio_request_array - request multiple GPIOs in a single call
83 * @num: how many GPIOs in the array
85 int gpio_request_array(const struct gpio *array, size_t num) in gpio_request_array()
87 int i, err; in gpio_request_array()
90 err = gpio_request_one(array->gpio, array->flags, array->label); in gpio_request_array()
97 while (i--) in gpio_request_array()
98 gpio_free((--array)->gpio); in gpio_request_array()
104 * gpio_free_array - release multiple GPIOs in a single call
106 * @num: how many GPIOs in the array
110 while (num--) in gpio_free_array()
111 gpio_free((array++)->gpio); in gpio_free_array()