[PATCH v1 0/4] gpio: Unify the GPIO controller node check

Andy Shevchenko posted 4 patches 1 month ago
drivers/gpio/gpiolib-shared.c          | 6 ++----
drivers/pinctrl/nuvoton/pinctrl-ma35.c | 4 ++--
drivers/pinctrl/pinctrl-pistachio.c    | 2 +-
include/linux/gpio/driver.h            | 7 ++++++-
4 files changed, 11 insertions(+), 8 deletions(-)
[PATCH v1 0/4] gpio: Unify the GPIO controller node check
Posted by Andy Shevchenko 1 month ago
There are handful of drivers perform the same check in different variations
over and over with a potential to make subtle mistakes. Unify the check by
providing a new helper and convert a few users as an example.

Andy Shevchenko (4):
  gpio: Split fwnode_is_gpiochip() helper
  gpio: shared: Replace open coded fwnode_is_gpiochip()
  pinctrl: ma35: Replace open coded fwnode_is_gpiochip()
  pinctrl: pistachio: Replace open coded fwnode_is_gpiochip()

 drivers/gpio/gpiolib-shared.c          | 6 ++----
 drivers/pinctrl/nuvoton/pinctrl-ma35.c | 4 ++--
 drivers/pinctrl/pinctrl-pistachio.c    | 2 +-
 include/linux/gpio/driver.h            | 7 ++++++-
 4 files changed, 11 insertions(+), 8 deletions(-)

-- 
2.50.1
Re: [PATCH v1 0/4] gpio: Unify the GPIO controller node check
Posted by Bartosz Golaszewski 1 month ago
On Mon, 24 Aug 2026 09:42:31 +0200, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> said:
> There are handful of drivers perform the same check in different variations
> over and over with a potential to make subtle mistakes. Unify the check by
> providing a new helper and convert a few users as an example.
>
> Andy Shevchenko (4):
>   gpio: Split fwnode_is_gpiochip() helper
>   gpio: shared: Replace open coded fwnode_is_gpiochip()
>   pinctrl: ma35: Replace open coded fwnode_is_gpiochip()
>   pinctrl: pistachio: Replace open coded fwnode_is_gpiochip()
>
>  drivers/gpio/gpiolib-shared.c          | 6 ++----
>  drivers/pinctrl/nuvoton/pinctrl-ma35.c | 4 ++--
>  drivers/pinctrl/pinctrl-pistachio.c    | 2 +-
>  include/linux/gpio/driver.h            | 7 ++++++-
>  4 files changed, 11 insertions(+), 8 deletions(-)
>
> --
> 2.50.1
>
>

I like it. With an Ack from Linus, I can take the series through the GPIO tree.

Bart
Re: [PATCH v1 0/4] gpio: Unify the GPIO controller node check
Posted by Andy Shevchenko 1 month ago
On Wed, Aug 26, 2026 at 05:33:23AM -0500, Bartosz Golaszewski wrote:
> On Mon, 24 Aug 2026 09:42:31 +0200, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> said:
> > There are handful of drivers perform the same check in different variations
> > over and over with a potential to make subtle mistakes. Unify the check by
> > providing a new helper and convert a few users as an example.
> >
> 
> I like it. With an Ack from Linus, I can take the series through the GPIO tree.

Thanks, but note that I need to either drop or redo the patch 2/4.

-- 
With Best Regards,
Andy Shevchenko