[PATCH 1/1] watchdog: gpio_wdt: add ACPI support

From: Flavio Suligoi

Date: Mon Mar 23 2026 - 09:09:44 EST


The gpio_wdt device driver uses the device property APIs, so it is
firmware agnostic. For this reason we can now add the ACPI support in
Kconfig.
In this way it can be used seamlessly in ACPI and DT systems.

For example, a typical GPIO watchdog device configuration, in an ACPI
SSDT table, could be:

Device (WDOG) {
Name (_HID, "WDOG0001")
Name (_CID, "PRP0001")
Name (_UID, One)
Name (_CRS, ResourceTemplate () {
GpioIo (Exclusive, PullNone, 0, 0, IoRestrictionOutputOnly,
"\\_SB.GPI0", 0, ResourceConsumer, ,) { 3 }
})
Method (_STA, 0, NotSerialized) {
Return (0x0F)
}
Name (_DSD, Package (2)
{
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package (5)
{
Package () { "compatible", Package() { "linux,wdt-gpio" } },
Package () { "hw_algo", "toggle" },
Package () { "gpios", Package () { ^WDOG, 0, 0, 0 } },
Package () { "hw_margin_ms", 2000 },
Package () { "always-running", 1 },
},
})
}

Signed-off-by: Flavio Suligoi <f.suligoi@xxxxxxx>
---
drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index dc78729ba2a5..966489fe8c8d 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 (ACPI && GPIOLIB) || OF_GPIO
select WATCHDOG_CORE
help
If you say yes here you get support for watchdog device
--
2.43.0