Lines Matching +full:dev +full:- +full:a +full:- +full:active +full:- +full:pins
1 /* SPDX-License-Identifier: GPL-2.0 */
24 * struct gpio_device - internal state container for GPIO devices
25 * @dev: the GPIO device struct
30 * @owner: helps prevent removal of modules exporting active GPIOs
38 * @label: a descriptive name for the GPIO device, such as the part number
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
49 * @pin_ranges: range of pins served by the GPIO driver
52 * for a GPIO device and can hold references and live on after the
57 struct device dev; member
78 * corresponding pins for gpio usage.
84 static inline struct gpio_device *to_gpio_device(struct device *dev) in to_gpio_device() argument
86 return container_of(dev, struct gpio_device, dev); in to_gpio_device()
93 * struct gpio_array - Opaque descriptor for a structure of GPIO array attributes
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.
155 * Contrary to integers, a pointer to a &struct gpio_desc is guaranteed to be
166 #define FLAG_ACTIVE_LOW 6 /* value has active low */
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()
223 int gpiochip_get_ngpios(struct gpio_chip *gc, struct device *dev);
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 ? : "?",\
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__)