Re: [PATCH] gpio: shared: drop the parent check for reset-gpio devices
From: Bartosz Golaszewski
Date: Fri Nov 06 2026 - 05:54:21 EST
On Fri, Nov 06, 2026 at 12:28:50AM -0500, Tyler Baker wrote:
> gpio_shared_dev_is_reset_gpio() requires the reset-gpio device's parent
> to carry the GPIO chip's fwnode. Once the reset core parents that device
> to the GPIO controller instead, this fails on controllers with a
> gpio_chip and fwnode per bank, so their shared reset lines are no longer
> matched.
>
Again: mixing up of the naming convention for devices. It should be:
"gpio_shared_dev_is_reset_gpio() requires the reset-gpio device's parent
to carry the GPIO controller's fwnode. Once the reset core parents that device
to the GPIO controller's parent instead, this fails on controllers with a
gpio_chip and separate fwnode per bank, so their shared reset lines are no
longer matched."
> The check is redundant: only devices compatible with "reset-gpio" get
> here, and their reset-gpios reference must already name the chip's
> fwnode. Drop it.
>
> Signed-off-by: Tyler Baker <tyler.baker@xxxxxxxxxxxxxxxx>
> ---
> On top of Abel's "reset: gpio: Parent the reset-gpio device to the GPIO
> controller":
> https://lore.kernel.org/r/20261026-b4-reset-gpio-parent-to-gpio-controller-v1-1-11549e6ea930@xxxxxxxxxxxxxxxx
This passes my tests, though I have it in the back of my head that there
was a reason for this more strict check. I can't remember what it was
anymore so I'm fine with the change, if it introduces a regression, we
can revert it.
Abel's patch introduces a regression that this patch fixes so we should squash
the two, get an Acked-by from Philipp and sent them via the GPIO tree.
Bart