gpio: Add helpers to ease the transition towards immutable irq_chip
authorMarc Zyngier <maz@kernel.org>
Tue, 19 Apr 2022 14:18:39 +0000 (15:18 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 19 Apr 2022 14:22:25 +0000 (15:22 +0100)
commit36b78aae4bfee749bbde73be570796bfd0f56bec
treeb0ac848a61ecfce3fa578d4e63c8c7ba3c152a9b
parent704f08753b6dcd0e08c1953af0b2c7f3fac87111
gpio: Add helpers to ease the transition towards immutable irq_chip

Add a couple of new helpers to make it slightly simpler to convert
drivers to immutable irq_chip structures:

- GPIOCHIP_IRQ_RESOURCE_HELPERS populates the irq_chip structure
  with the resource management callbacks

- gpio_irq_chip_set_chip() populates the gpio_irq_chip.chip
  structure, avoiding the proliferation of ugly casts

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220419141846.598305-4-maz@kernel.org
include/linux/gpio/driver.h