Lines Matching +full:child +full:- +full:interrupt +full:- +full:base
1 /* SPDX-License-Identifier: GPL-2.0 */
10 #include <linux/pinctrl/pinconf-generic.h>
46 * struct gpio_irq_chip - GPIO interrupt controller
59 * Interrupt translation domain; responsible for mapping between GPIO
76 * If non-NULL, will be set as the parent of this GPIO interrupt
77 * controller's IRQ domain to establish a hierarchical interrupt
79 * interrupt support.
86 * This callback translates a child hardware IRQ offset to a parent
87 * hardware IRQ offset on a hierarchical interrupt chip. The child
88 * hardware IRQs correspond to the GPIO index 0..ngpio-1 (see the
96 * HWIRQ, return -EINVAL, but also make sure to fill in @valid_mask and
111 * &gpiochip_populate_parent_fwspec_twocell will be used. A four-cell
123 * This optional callback is used to translate the child's GPIO line
175 * The interrupt handler for the GPIO chip's parent interrupts, may be
186 * parent interrupt.
204 * The number of interrupt parents of a GPIO chip.
211 * A list of interrupt parents of a GPIO chip. This is owned by the
219 * A list of interrupt parents for each line of a GPIO chip.
226 * True if set the interrupt handling uses nested threads.
268 * bits from 0..(ngpios-1) set to "1" as in valid. The callback can
321 * struct gpio_chip - abstract a GPIO controller
323 * number or the name of the SoC IP-block implementing it.
328 * @request: optional hook for chip-specific activation, such as
330 * @free: optional hook for chip-specific deactivation, such as
335 * function, even on input-only or output-only gpio chips.
337 * This can be omitted on input-only or output-only gpio chips.
339 * This can be omitted on input-only or output-only gpio chips.
347 * @to_irq: optional hook supporting non-static gpiod_to_irq() mappings;
361 * @base: identifies the first GPIO number handled by this chip;
363 * DEPRECATION: providing anything non-negative and nailing the base
364 * offset of GPIO chips is deprecated. Please pass -1 as base to
365 * let gpiolib select the chip base in all possible cases. We want to
368 * handled is (base + ngpio - 1).
397 * @bgpio_lock: used to lock chip->bgpio_data. Also, this is needed to keep
411 * by "offset" values in the range 0..(@ngpio - 1). When those signals
413 * is calculated by subtracting @base from the gpio number.
463 int base; member
494 * Integrates interrupt chip functionality with the GPIO chip. Can be
524 * Callback to translate a device tree GPIO specifier into a chip-
536 * for_each_requested_gpio_in_range - iterates over requested GPIOs in a given range
539 * @base: first GPIO in the range
540 * @size: amount of GPIOs to check starting from @base
543 #define for_each_requested_gpio_in_range(chip, i, base, size, label) \ argument
545 if ((label = gpiochip_is_requested(chip, base + i)) == NULL) {} else
549 for_each_requested_gpio_in_range(chip, i, 0, chip->ngpio, label)
557 * gpiochip_add_data() - register a gpio_chip
558 * @gc: the chip to register, with gc->base initialized
559 * @data: driver-private data associated with this chip
564 * can be freely used, the gc->parent device must be registered before
571 * If gc->base is negative, this requests dynamic assignment of
576 * gc->base is invalid or already associated with a different chip.
635 girq->chip = (struct irq_chip *)chip; in gpio_irq_chip_set_chip()
651 int base; member
705 return -EINVAL; in gpiochip_irqchip_add_domain()
715 * struct gpio_pin_range - pin range controlled by a gpio chip
786 return ERR_PTR(-ENODEV); in gpiod_to_chip()
793 return -EINVAL; in gpiochip_lock_as_irq()
803 #define for_each_gpiochip_node(dev, child) \ argument
804 device_for_each_child_node(dev, child) \
805 if (!fwnode_property_present(child, "gpio-controller")) {} else
809 struct fwnode_handle *child; in gpiochip_node_count() local
812 for_each_gpiochip_node(dev, child) in gpiochip_node_count()