[PATCH v2 1/5] watchdog: add devm_watchdog_register_device() to watchdog-kernel-api

From: Randy Dunlap

Date: Fri May 29 2026 - 17:21:15 EST


devm_watchdog_register_device() is not documented. Add it to the current
kernel API documentation.

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
---
v2: no changes

Cc: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Cc: linux-watchdog@xxxxxxxxxxxxxxx
Cc: Jonathan Corbet <corbet@xxxxxxx>
Cc: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
Cc: linux-doc@xxxxxxxxxxxxxxx

Documentation/watchdog/watchdog-kernel-api.rst | 8 ++++++++
1 file changed, 8 insertions(+)

--- linux-next-20260525.orig/Documentation/watchdog/watchdog-kernel-api.rst
+++ linux-next-20260525/Documentation/watchdog/watchdog-kernel-api.rst
@@ -42,6 +42,14 @@ The watchdog subsystem includes a regist
which allows you to register a watchdog as early as you wish during
the boot process.

+There is also a resource-managed watchdog_register_device(),
+devm_watchdog_register_device(). If you use this to register a watchdog
+device, watchdog_unregister_device() is called automatically on driver
+detach::
+
+ int devm_watchdog_register_device(struct device *dev,
+ struct watchdog_device *wdd);
+
The watchdog device structure looks like this::

struct watchdog_device {