Re: [RFC PATCH v2 1/3] gpio: mmio: convert accessors to generic register descriptors
From: Linus Walleij
Date: Wed Apr 22 2026 - 12:50:41 EST
On Mon, Apr 13, 2026 at 12:24 PM Jose Javier Rodriguez Barbarin
<dev-josejavier.rodriguez@xxxxxxxxxx> wrote:
> Convert the gpio-mmio accessors to use union gpio_chip_reg instead of
> the previous MMIO-only register type.
>
> This allows the same accessors to operate on both MMIO and PMIO
> registers and aligns gpio-mmio with the updated gpio_generic_chip API.
>
> Move the initialization code shared by MMIO and PMIO devices to a new
> function gpio_generic_chip_init_common(), leaving gpio_generic_chip_init()
> with the MMIO-specific initialization.
>
> Signed-off-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@xxxxxxxxxx>
This solution looks elegant to me:
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij