Lines Matching +full:has +full:- +full:chip +full:- +full:id

1 /* SPDX-License-Identifier: GPL-2.0 */
26 * struct gpio_device - internal state container for GPIO devices
29 * @id: numerical ID number for the GPIO chip
33 * @chip: pointer to the corresponding gpiochip, holding static
37 * used from the chip.
41 * @can_sleep: indicate whether the GPIO chip driver's callbacks can sleep
46 * or name of the IP component in a System on Chip.
47 * @data: per-instance data assigned by the driver
51 * @line_state_lock: RW-spinlock protecting the line state notifier
56 * @srcu: protects the pointer to the underlying GPIO chip
61 * GPIO chip has been removed, if it is still being used from
67 int id; member
70 struct gpio_chip __rcu *chip; member
111 snprintf(propname, sizeof(propname), "%s-%s", con_id, __gs); \
119 * struct gpio_array - Opaque descriptor for a structure of GPIO array attributes
143 __i < gc->ngpio && (desc = gpiochip_get_desc(gc, __i)); \
148 if (!test_bit(flag, &desc->flags)) {} else
173 * struct gpio_desc - Opaque descriptor for a GPIO
183 * integer-based handles.
196 #define FLAG_ACTIVE_LOW 6 /* value has active low */
203 #define FLAG_PULL_UP 13 /* GPIO has pull up enabled */
204 #define FLAG_PULL_DOWN 14 /* GPIO has pull down enabled */
205 #define FLAG_BIAS_DISABLE 15 /* GPIO has pull disabled */
224 #define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
234 srcu_read_unlock(&_T.gdev->srcu, _T.idx),
238 _guard.gdev = desc->gdev;
239 _guard.idx = srcu_read_lock(&_guard.gdev->srcu);
240 _guard.gc = srcu_dereference(_guard.gdev->chip,
241 &_guard.gdev->srcu);
255 if (ret == -EPROBE_DEFER) in gpiod_request_user()
256 ret = -ENODEV; in gpiod_request_user()
280 * Return the GPIO number of the passed descriptor relative to its chip
284 return desc - &desc->gdev->descs[0]; in gpio_chip_hwgpio()
291 scoped_guard(srcu, &desc->gdev->desc_srcu) { \
292 pr_err("gpio-%d (%s): " fmt, desc_to_gpio(desc), \
299 scoped_guard(srcu, &desc->gdev->desc_srcu) { \
300 pr_warn("gpio-%d (%s): " fmt, desc_to_gpio(desc), \
307 scoped_guard(srcu, &desc->gdev->desc_srcu) { \
308 pr_debug("gpio-%d (%s): " fmt, desc_to_gpio(desc), \
313 /* With chip prefix */
316 dev_err(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
318 dev_warn(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
320 dev_info(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
322 dev_dbg(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)