[RFC PATCH v2 0/3] gpio: add PMIO support to gpio-mmio
From: Jose Javier Rodriguez Barbarin
Date: Mon Apr 13 2026 - 06:24:49 EST
This series is an RFC for adding port-mapped I/O (PMIO) support to
gpio-mmio.
This v2 comes with all suggestions done by Linux Walleij in the
initial review [1].
For keeping compatibility with gpio_generic_chip, a new _config struct
was added instead of extending gpio_generic_chip_config. Using such new
_config struct, called gpio_generic_chip_port_config, requires a new API
function gpio_generic_chip_port_init() to access to that new structure.
Besides, structure gpio_chip_reg has been transformed to union. It reflects
better that MMIO and PMIO chips will only use one of them, saving memory
as well.
I'm still sending this as RFC but I don't know if I should send this as a
regular PATCH series.
[1] https://lore.kernel.org/linux-gpio/20260407184805.807328-1-dev-josejavier.rodriguez@xxxxxxxxxx
---
Changes in v2:
- Move struct gpio_chip_reg to union gpio_chip_reg.
- Add a new gpio-mmio API function to init PMIO generic chips.
Jose Javier Rodriguez Barbarin (3):
gpio: mmio: convert accessors to generic register descriptors
gpio: mmio: add port-mapped read/write callbacks
gpio: mmio: add port-mapped support for gpio_generic_chip
drivers/gpio/gpio-mmio.c | 330 ++++++++++++++++++++++++-----------
include/linux/gpio/generic.h | 78 ++++++++-
2 files changed, 300 insertions(+), 108 deletions(-)
--
2.53.0