Re: [RFC PATCH 0/5] gpio: add PMIO support to gpio-mmio
From: Linus Walleij
Date: Thu Apr 09 2026 - 04:15:11 EST
Hi Jose,
thanks for your proposal!!
I'm very happy to see some traction on this. I add WBG to CC because he
wrote so many port-mapped drivers that I think he'll be thrilled to make
use of this as well.
On Tue, Apr 7, 2026 at 8:49 PM Jose Javier Rodriguez Barbarin
<dev-josejavier.rodriguez@xxxxxxxxxx> wrote:
> This series is an RFC for adding port-mapped I/O (PMIO) support to
> gpio-mmio.
(...)
> In particular, feedback would be appreciated on:
> - whether extending gpio_generic_chip_config is the right direction;
Pointed out on the patch that you can just create a
gpio_generic_port_chip_config
or something like that, it's only used at config time (usually locally
in probe()) resulting in a transient stack allocation anyway.
Also that makes it easier to see what's going on.
> - whether introducing a common MMIO/PMIO register descriptor is
> acceptable;
> - whether PMIO support should instead be implemented differently in
> gpio-mmio.
The main feedback I have is to use a union between port and
MMIO address instead of a struct with both.
It makes it clear that we only ever use one of them and saves
some memory, especially since we use several instances of
it per generic chip later in the code.
Yours,
Linus Walleij