[PATCH v2 00/15] gpio: replace legacy bgpio_init() with its modernized alternative - part 4

Bartosz Golaszewski brgl at bgdev.pl
Thu Sep 11 00:38:12 PDT 2025


On Wed, Sep 10, 2025 at 11:32 PM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> On Wed, Sep 10, 2025 at 9:12 AM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
>
> > Here's the final part of the generic GPIO chip conversions. Once all the
> > existing users are switched to the new API, the final patch in the
> > series removes bgpio_init(), moves the gpio-mmio fields out of struct
> > gpio_chip and into struct gpio_generic_chip and adjusts gpio-mmio.c to
> > the new situation.
> >
> > Down the line we could probably improve gpio-mmio.c by using lock guards
> > and replacing the - now obsolete - "bgpio" prefix with "gpio_generic" or
> > something similar but this series is already big as is so I'm leaving
> > that for the future.
> >
> > Tested in qemu on vexpress-a9.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>
> The patch set is a beauty, hands down.
> Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
>
> I especially like where you caught local spinlocks being
> (ab)used instead of the generic irqchip ones.
>
> I don't know about merging patch 15/15 into just the GPIO
> tree, that can make things fail in other subsystems depending
> on merge order into Torvalds tree or linux-next if your tree is
> merged first.
>
> I would merge the first 14 and keep the last for the later part
> of the merge window when all other trees with conversions
> are merged.
>
> (You probably already thought of this.)
>
> Yours,
> Linus Walleij

I already have both pinctrl and mfd changes in my tree from Lee's and
your immutable branches. I pushed this into gpio/devel and it built
just fine.

Bart



More information about the linux-riscv mailing list