]> git.ipfire.org Git - thirdparty/linux.git/commit
reset: gpio: add a devlink between reset-gpio and its consumer
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Fri, 6 Mar 2026 17:22:46 +0000 (18:22 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 9 Mar 2026 09:17:50 +0000 (10:17 +0100)
commita9b95ce36de4422761dc2a2afc01e1781801800c
treeca80f5d3f0ec4e40ae69f4dae9bfd66222a6f969
parentfe3da77f2f946e84d13e5183ae0fa223b968766b
reset: gpio: add a devlink between reset-gpio and its consumer

The device that requests the reset control managed by the reset-gpio
device is effectively its consumer but the devlink is only established
between it and the GPIO controller exposing the reset pin. Add a devlink
between the consumer of the reset control and its supplier. This will
allow us to simplify the GPIOLIB code managing shared GPIOs when
handling the corner case of reset-gpio and gpiolib-shared interacting.
While at it and since we need to store the address of the auxiliary
device: don't allocate memory for the device separately but fold it into
struct reset_gpio_lookup instead.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/core.c