Lines Matching +full:has +full:- +full:chip +full:- +full:id
1 /* SPDX-License-Identifier: GPL-2.0 */
24 * struct gpio_device - internal state container for GPIO devices
27 * @id: numerical ID number for the GPIO chip
31 * @chip: pointer to the corresponding gpiochip, holding static
39 * or name of the IP component in a System on Chip.
40 * @data: per-instance data assigned by the driver
46 * @sem: protects the structure from a NULL-pointer dereference of @chip by
47 * user-space operations when the device gets unregistered during
48 * a hot-unplug event
53 * GPIO chip has been removed, if it is still being used from
59 int id; member
62 struct gpio_chip *chip; member
93 * struct gpio_array - Opaque descriptor for a structure of GPIO array attributes
97 * @chip: Parent GPIO chip
109 struct gpio_chip *chip; member
119 __i < gc->ngpio && (desc = gpiochip_get_desc(gc, __i)); \
124 if (!test_bit(flag, &desc->flags)) {} else
143 * struct gpio_desc - Opaque descriptor for a GPIO
153 * integer-based handles.
166 #define FLAG_ACTIVE_LOW 6 /* value has active low */
173 #define FLAG_PULL_UP 13 /* GPIO has pull up enabled */
174 #define FLAG_PULL_DOWN 14 /* GPIO has pull down enabled */
175 #define FLAG_BIAS_DISABLE 15 /* GPIO has pull disabled */
194 #define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
204 if (ret == -EPROBE_DEFER) in gpiod_request_user()
205 ret = -ENODEV; in gpiod_request_user()
226 * Return the GPIO number of the passed descriptor relative to its chip
230 return desc - &desc->gdev->descs[0]; in gpio_chip_hwgpio()
236 pr_emerg("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",\
239 pr_crit("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
242 pr_err("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
245 pr_warn("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
248 pr_info("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?", \
251 pr_debug("gpio-%d (%s): " fmt, desc_to_gpio(desc), desc->label ? : "?",\
254 /* With chip prefix */
257 dev_emerg(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
259 dev_crit(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
261 dev_err(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
263 dev_warn(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
265 dev_info(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)
267 dev_dbg(&gc->gpiodev->dev, "(%s): " fmt, gc->label, ##__VA_ARGS__)