[PATCH v3] watchdog: convert the Kconfig dependency on OF_GPIO to OF

From: Bartosz Golaszewski

Date: Wed May 06 2026 - 04:17:15 EST


OF_GPIO is selected automatically on all OF systems. Any symbols it
controls also provide stubs so there's really no reason to select it
explicitly. We could simply remove the dependency but in order to avoid
a new symbol popping up for everyone in make config - just convert it to
requiring CONFIG_OF.

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
---
Changes in v3:
- Send the watchdog patch separately so that it can be picked up for v7.2
- Link to v2: https://patch.msgid.link/20260316-gpio-of-kconfig-v2-0-de2f4b00a0e4@xxxxxxxxxxxxxxxx

Changes in v2:
- Make gpio-watchdog depend on OF && GPIOLIB
- Drop picked up patches
- Link to v1: https://patch.msgid.link/20260304-gpio-of-kconfig-v1-0-d597916e79e7@xxxxxxxxxxxxxxxx

drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index dc78729ba2a5..ab1d5d6df5f3 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -250,7 +250,7 @@ config DA9062_WATCHDOG

config GPIO_WATCHDOG
tristate "Watchdog device controlled through GPIO-line"
- depends on OF_GPIO
+ depends on OF && GPIOLIB
select WATCHDOG_CORE
help
If you say yes here you get support for watchdog device
--
2.47.3