]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
watchdog: gpio_wdt: add ACPI support
authorFlavio Suligoi <f.suligoi@asem.it>
Mon, 23 Mar 2026 12:52:04 +0000 (13:52 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 3 May 2026 15:40:32 +0000 (08:40 -0700)
commit5abb70c8f7582950e490823f4a94a3597ada9d83
treeb6da3292f8dcee193757ac8b7407a3e21ada15c0
parentd8207d1e9a36b1a8a461581b2d4073ea28335603
watchdog: gpio_wdt: add ACPI support

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@asem.it>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20260323125204.164785-2-f.suligoi@asem.it
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/Kconfig