Lines Matching +full:a +full:- +full:gpio

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * devres.c - managed gpio resources
15 #include <linux/gpio/consumer.h>
33 * devm_gpiod_get - Resource-managed gpiod_get()
34 * @dev: GPIO consumer
35 * @con_id: function within the GPIO consumer
36 * @flags: optional GPIO initialization flags
38 * Managed gpiod_get(). GPIO descriptors returned from this function are
43 * The GPIO descriptor corresponding to the function @con_id of device
44 * dev, %-ENOENT if no GPIO has been assigned to the requested function, or
45 * another IS_ERR() code if an error occurred while trying to acquire the GPIO.
56 * devm_gpiod_get_optional - Resource-managed gpiod_get_optional()
57 * @dev: GPIO consumer
58 * @con_id: function within the GPIO consumer
59 * @flags: optional GPIO initialization flags
61 * Managed gpiod_get_optional(). GPIO descriptors returned from this function
66 * The GPIO descriptor corresponding to the function @con_id of device
67 * dev, NULL if no GPIO has been assigned to the requested function, or
68 * another IS_ERR() code if an error occurred while trying to acquire the GPIO.
79 * devm_gpiod_get_index - Resource-managed gpiod_get_index()
80 * @dev: GPIO consumer
81 * @con_id: function within the GPIO consumer
82 * @idx: index of the GPIO to obtain in the consumer
83 * @flags: optional GPIO initialization flags
85 * Managed gpiod_get_index(). GPIO descriptors returned from this function are
90 * The GPIO descriptor corresponding to the function @con_id of device
91 * dev, %-ENOENT if no GPIO has been assigned to the requested function, or
92 * another IS_ERR() code if an error occurred while trying to acquire the GPIO.
107 * For non-exclusive GPIO descriptors, check if this descriptor is in devm_gpiod_get_index()
127 * devm_fwnode_gpiod_get_index - get a GPIO descriptor from a given node
128 * @dev: GPIO consumer
129 * @fwnode: firmware node containing GPIO reference
130 * @con_id: function within the GPIO consumer
131 * @index: index of the GPIO to obtain in the consumer
132 * @flags: GPIO initialization flags
133 * @label: label to attach to the requested GPIO
135 * GPIO descriptors returned from this function are automatically disposed on
139 * The GPIO descriptor corresponding to the function @con_id of device
140 * dev, %-ENOENT if no GPIO has been assigned to the requested function, or
141 * another IS_ERR() code if an error occurred while trying to acquire the GPIO.
165 * devm_gpiod_get_index_optional - Resource-managed gpiod_get_index_optional()
166 * @dev: GPIO consumer
167 * @con_id: function within the GPIO consumer
168 * @index: index of the GPIO to obtain in the consumer
169 * @flags: optional GPIO initialization flags
171 * Managed gpiod_get_index_optional(). GPIO descriptors returned from this
177 * The GPIO descriptor corresponding to the function @con_id of device
178 * dev, %NULL if no GPIO has been assigned to the requested function, or
179 * another IS_ERR() code if an error occurred while trying to acquire the GPIO.
197 * devm_gpiod_get_array - Resource-managed gpiod_get_array()
198 * @dev: GPIO consumer
199 * @con_id: function within the GPIO consumer
200 * @flags: optional GPIO initialization flags
202 * Managed gpiod_get_array(). GPIO descriptors returned from this function are
207 * The GPIO descriptors corresponding to the function @con_id of device
208 * dev, %-ENOENT if no GPIO has been assigned to the requested function,
232 * devm_gpiod_get_array_optional - Resource-managed gpiod_get_array_optional()
233 * @dev: GPIO consumer
234 * @con_id: function within the GPIO consumer
235 * @flags: optional GPIO initialization flags
237 * Managed gpiod_get_array_optional(). GPIO descriptors returned from this
243 * The GPIO descriptors corresponding to the function @con_id of device
244 * dev, %NULL if no GPIO has been assigned to the requested function,
263 * devm_gpiod_put - Resource-managed gpiod_put()
264 * @dev: GPIO consumer
265 * @desc: GPIO descriptor to dispose of
267 * Dispose of a GPIO descriptor obtained with devm_gpiod_get() or
268 * devm_gpiod_get_index(). Normally this function will not be called as the GPIO
278 * devm_gpiod_unhinge - Remove resource management from a gpio descriptor
279 * @dev: GPIO consumer
280 * @desc: GPIO descriptor to remove resource management from
283 * This function should not be used. It's been provided as a workaround for
285 * with a better solution.
287 * Remove resource management from a GPIO descriptor. This is needed when
288 * you want to hand over lifecycle management of a descriptor to another
299 * If the GPIO descriptor is requested as nonexclusive, we in devm_gpiod_unhinge()
301 * so it is OK if devres_destroy() returns -ENOENT. in devm_gpiod_unhinge()
304 if (ret == -ENOENT) in devm_gpiod_unhinge()
312 * devm_gpiod_put_array - Resource-managed gpiod_put_array()
313 * @dev: GPIO consumer
314 * @descs: GPIO descriptor array to dispose of
316 * Dispose of an array of GPIO descriptors obtained with devm_gpiod_get_array().
334 * devm_gpiochip_add_data_with_key() - Resource managed gpiochip_add_data_with_key()
336 * @gc: the GPIO chip to register
337 * @data: driver-private data associated with this chip
343 * The gpio chip automatically be released when the device is unbound.
346 * A negative errno if the chip can't be registered, such as because the
347 * gc->base is invalid or already associated with a different chip.
348 * Otherwise it returns zero as a success code.