* [PATCH] Revert "reset: always bail out on missing RESET_GPIO driver"
@ 2025-11-05 9:39 Philipp Zabel
2025-11-05 9:43 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2025-11-05 9:39 UTC (permalink / raw)
To: linux-kernel
Cc: Wolfram Sang, Krzysztof Kozlowski, Kuninori Morimoto,
Marek Szyprowski, kernel, Philipp Zabel
This reverts commit 25d4d4604d01eb0ce5254f0516826127dacb5015, which
caused unexpected fallout:
Drivers that handle optional reset GPIOs via the reset controller API,
on platforms that have a reset-gpios property in the device tree node,
would fail to probe instead of falling back to either ignoring the reset
or handling it via the GPIO API, if the RESET_GPIO driver was disabled.
Suggested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/reset/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 4fbaa67a6f79..8029e547e3db 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -1001,6 +1001,9 @@ __of_reset_control_get(struct device_node *node, const char *id, int index,
if (ret == -EINVAL)
return ERR_PTR(ret);
if (ret) {
+ if (!IS_ENABLED(CONFIG_RESET_GPIO))
+ return optional ? NULL : ERR_PTR(ret);
+
/*
* There can be only one reset-gpio for regular devices, so
* don't bother with the "reset-gpios" phandle index.
@@ -1010,11 +1013,6 @@ __of_reset_control_get(struct device_node *node, const char *id, int index,
if (ret)
return optional ? NULL : ERR_PTR(ret);
- if (!IS_ENABLED(CONFIG_RESET_GPIO)) {
- pr_err("%s(): RESET_GPIO driver not enabled, cannot fall back\n", __func__);
- return ERR_PTR(-ENOEXEC);
- }
-
gpio_fallback = true;
ret = __reset_add_reset_gpio_device(&args);
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Revert "reset: always bail out on missing RESET_GPIO driver"
2025-11-05 9:39 [PATCH] Revert "reset: always bail out on missing RESET_GPIO driver" Philipp Zabel
@ 2025-11-05 9:43 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2025-11-05 9:43 UTC (permalink / raw)
To: Philipp Zabel
Cc: linux-kernel, Krzysztof Kozlowski, Kuninori Morimoto,
Marek Szyprowski, kernel
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On Wed, Nov 05, 2025 at 10:39:20AM +0100, Philipp Zabel wrote:
> This reverts commit 25d4d4604d01eb0ce5254f0516826127dacb5015, which
> caused unexpected fallout:
>
> Drivers that handle optional reset GPIOs via the reset controller API,
> on platforms that have a reset-gpios property in the device tree node,
> would fail to probe instead of falling back to either ignoring the reset
> or handling it via the GPIO API, if the RESET_GPIO driver was disabled.
>
> Suggested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thank you!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-05 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 9:39 [PATCH] Revert "reset: always bail out on missing RESET_GPIO driver" Philipp Zabel
2025-11-05 9:43 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox