[PATCH v2 0/2] Migrate PCIe-IDIO-24 GPIO driver to the regmap API

From: William Breathitt Gray
Date: Wed Mar 01 2023 - 07:58:51 EST


Changes in v2:
- Simplify PCIe-IDIO-24 register offset defines to remove superfluous
arithmetic
- Check for NULL pointer after chip->irq_drv_data allocation
- Set gpio_regmap drvdata and use gpio_regmap_get_drvdata() to get the
regmap in idio_24_reg_map_xlate()

The regmap API supports IO port accessors so we can take advantage of
regmap abstractions rather than handling access to the device registers
directly in the driver.

A patch to pass the device regmap and irq_drv_data as a parameters for
the struct regmap_irq_chip set_type_config() is included. This is needed
by idio_24_set_type_config() in order to update the type configuration
on the device as well as irq_drv_data for idio_24_handle_mask_sync().

William Breathitt Gray (2):
regmap: Pass regmap and irq_drv_data as parameters for
set_type_config()
gpio: pcie-idio-24: Migrate to the regmap API

drivers/base/regmap/regmap-irq.c | 13 +-
drivers/gpio/Kconfig | 3 +
drivers/gpio/gpio-pcie-idio-24.c | 693 ++++++++++++-------------------
include/linux/regmap.h | 12 +-
4 files changed, 279 insertions(+), 442 deletions(-)


base-commit: 4827aae061337251bb91801b316157a78b845ec7
--
2.39.2