watchdog: add pulse support to gpio watchdog driver
authorPaul Doelle <paaull.git@gmail.com>
Mon, 4 Jul 2022 09:00:25 +0000 (09:00 +0000)
committerStefan Roese <sr@denx.de>
Thu, 21 Jul 2022 06:09:06 +0000 (08:09 +0200)
commit1fc45d6483d77b9fbe84e546f4e6afe665ba827a
tree816bde119c06c1ec0836635ba9140f0cbe383dec
parent818055fd4e977593197a40bf1fb9b811673c2858
watchdog: add pulse support to gpio watchdog driver

A common external watchdog circuit is kept alive by triggering a short
pulse on the reset pin. This patch adds support for this use case, while
making the algorithm configurable in the devicetree.

The "linux,wdt-gpio" driver being modified is based off the equivalent
driver in the Linux kernel, which provides support for this algorithm.
This patch brings parity to this driver, and is kept aligned with
the functionality and devicetree configuration in the kernel.

It should be noted that this adds a required property named 'hw_algo'
to the devicetree binding, following suit with the kernel. I'm happy to
make this backward-compatible if preferred.

Signed-off-by: Paul Doelle <paaull.git@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/sandbox/dts/test.dts
doc/device-tree-bindings/watchdog/gpio-wdt.txt
drivers/watchdog/gpio_wdt.c
test/dm/wdt.c