]> Gentwo Git Trees - linux/.git/commit
reset: make the provider of reset-gpios the parent of the reset device
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 20 Nov 2025 13:24:02 +0000 (14:24 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 20 Nov 2025 15:51:48 +0000 (16:51 +0100)
commit46dae84a90f9845df661adb116560e33d47a82ee
tree07a09fe90f5220d88075c2cd51c71369590e2d44
parent97d85328e3dcb2b3acb249a7c82d96c18b6b0d5b
reset: make the provider of reset-gpios the parent of the reset device

Auxiliary devices really do need a parent so ahead of converting the
reset-gpios driver to registering on the auxiliary bus, make the GPIO
device that provides the reset GPIO the parent of the reset-gpio device.
To that end move the lookup of the GPIO device by fwnode to the
beginning of __reset_add_reset_gpio_device() which has the added benefit
of bailing out earlier, before allocating resources for the virtual
device, if the chip is not up yet.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/core.c