Lines Matching +full:enum +full:- +full:as +full:- +full:flags
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * devres.c - managed gpio resources
47 * devm_gpiod_get - Resource-managed gpiod_get()
50 * @flags: optional GPIO initialization flags
58 enum gpiod_flags flags) in devm_gpiod_get() argument
60 return devm_gpiod_get_index(dev, con_id, 0, flags); in devm_gpiod_get()
65 * devm_gpiod_get_optional - Resource-managed gpiod_get_optional()
68 * @flags: optional GPIO initialization flags
76 enum gpiod_flags flags) in devm_gpiod_get_optional() argument
78 return devm_gpiod_get_index_optional(dev, con_id, 0, flags); in devm_gpiod_get_optional()
83 * devm_gpiod_get_index - Resource-managed gpiod_get_index()
87 * @flags: optional GPIO initialization flags
96 enum gpiod_flags flags) in devm_gpiod_get_index() argument
101 desc = gpiod_get_index(dev, con_id, idx, flags); in devm_gpiod_get_index()
106 * For non-exclusive GPIO descriptors, check if this descriptor is in devm_gpiod_get_index()
109 if (flags & GPIOD_FLAGS_BIT_NONEXCLUSIVE) { in devm_gpiod_get_index()
122 return ERR_PTR(-ENOMEM); in devm_gpiod_get_index()
133 * devm_gpiod_get_from_of_node() - obtain a GPIO from an OF node
138 * @dflags: GPIO initialization flags
150 enum gpiod_flags dflags, in devm_gpiod_get_from_of_node()
161 * For non-exclusive GPIO descriptors, check if this descriptor is in devm_gpiod_get_from_of_node()
177 return ERR_PTR(-ENOMEM); in devm_gpiod_get_from_of_node()
188 * devm_fwnode_gpiod_get_index - get a GPIO descriptor from a given node
193 * @flags: GPIO initialization flags
200 * provided @flags.
205 enum gpiod_flags flags, in devm_fwnode_gpiod_get_index() argument
214 return ERR_PTR(-ENOMEM); in devm_fwnode_gpiod_get_index()
216 desc = fwnode_gpiod_get_index(fwnode, con_id, index, flags, label); in devm_fwnode_gpiod_get_index()
230 * devm_gpiod_get_index_optional - Resource-managed gpiod_get_index_optional()
234 * @flags: optional GPIO initialization flags
244 enum gpiod_flags flags) in devm_gpiod_get_index_optional() argument
248 desc = devm_gpiod_get_index(dev, con_id, index, flags); in devm_gpiod_get_index_optional()
250 if (PTR_ERR(desc) == -ENOENT) in devm_gpiod_get_index_optional()
259 * devm_gpiod_get_array - Resource-managed gpiod_get_array()
262 * @flags: optional GPIO initialization flags
270 enum gpiod_flags flags) in devm_gpiod_get_array() argument
278 return ERR_PTR(-ENOMEM); in devm_gpiod_get_array()
280 descs = gpiod_get_array(dev, con_id, flags); in devm_gpiod_get_array()
294 * devm_gpiod_get_array_optional - Resource-managed gpiod_get_array_optional()
297 * @flags: optional GPIO initialization flags
306 enum gpiod_flags flags) in devm_gpiod_get_array_optional() argument
310 descs = devm_gpiod_get_array(dev, con_id, flags); in devm_gpiod_get_array_optional()
311 if (PTR_ERR(descs) == -ENOENT) in devm_gpiod_get_array_optional()
319 * devm_gpiod_put - Resource-managed gpiod_put()
324 * devm_gpiod_get_index(). Normally this function will not be called as the GPIO
335 * devm_gpiod_unhinge - Remove resource management from a gpio descriptor
353 * If the GPIO descriptor is requested as nonexclusive, we in devm_gpiod_unhinge()
355 * so it is OK if devres_destroy() returns -ENOENT. in devm_gpiod_unhinge()
357 if (ret == -ENOENT) in devm_gpiod_unhinge()
365 * devm_gpiod_put_array - Resource-managed gpiod_put_array()
370 * Normally this function will not be called as the GPIOs will be disposed of
398 * devm_gpio_request - request a GPIO for a managed device
404 * same arguments and performs the same function as
419 return -ENOMEM; in devm_gpio_request()
435 * devm_gpio_request_one - request a single GPIO with initial setup
438 * @flags: GPIO configuration as specified by GPIOF_*
442 unsigned long flags, const char *label) in devm_gpio_request_one() argument
449 return -ENOMEM; in devm_gpio_request_one()
451 rc = gpio_request_one(gpio, flags, label); in devm_gpio_request_one()
465 * devm_gpio_free - free a GPIO
470 * same arguments and performs the same function as gpio_free().
490 * devm_gpiochip_add_data_with_key() - Resource managed gpiochip_add_data_with_key()
493 * @data: driver-private data associated with this chip
502 * A negative errno if the chip can't be registered, such as because the
503 * gc->base is invalid or already associated with a different chip.
504 * Otherwise it returns zero as a success code.
516 return -ENOMEM; in devm_gpiochip_add_data_with_key()