* [PATCH v3 1/5] watchdog: Change suffix .txt to .rst in references
2026-05-05 9:26 [PATCH v3 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
@ 2026-05-05 9:26 ` Philipp Hahn
2026-05-05 13:08 ` Guenter Roeck
2026-05-05 9:26 ` [PATCH v3 2/5] watchdog: Move `struct` before name Philipp Hahn
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Philipp Hahn @ 2026-05-05 9:26 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel
From: Philipp Hahn <phahn-oss@avm.de>
Fix link to documentation, which has already been converted to reST.
Also remove apostrophes which are no longer needed.
Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
Documentation/watchdog/convert_drivers_to_kernel_api.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index e83609a5d0071..9eddb962f8e4c 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -114,7 +114,7 @@ Add the watchdog operations
---------------------------
All possible callbacks are defined in 'struct watchdog_ops'. You can find it
-explained in 'watchdog-kernel-api.txt' in this directory. start() and
+explained in watchdog-kernel-api.rst in this directory. start() and
owner must be set, the rest are optional. You will easily find corresponding
functions in the old driver. Note that you will now get a pointer to the
watchdog_device as a parameter to these functions, so you probably have to
@@ -153,7 +153,7 @@ Add the watchdog device
Now we need to create a 'struct watchdog_device' and populate it with the
necessary information for the framework. The struct is also explained in detail
-in 'watchdog-kernel-api.txt' in this directory. We pass it the mandatory
+in watchdog-kernel-api.rst in this directory. We pass it the mandatory
watchdog_info struct and the newly created watchdog_ops. Often, old drivers
have their own record-keeping for things like bootstatus and timeout using
static variables. Those have to be converted to use the members in
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v3 1/5] watchdog: Change suffix .txt to .rst in references
2026-05-05 9:26 ` [PATCH v3 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
@ 2026-05-05 13:08 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2026-05-05 13:08 UTC (permalink / raw)
To: Philipp Hahn
Cc: Wim Van Sebroeck, Philipp Hahn, linux-watchdog, linux-doc,
linux-kernel
On Tue, May 05, 2026 at 11:26:12AM +0200, Philipp Hahn wrote:
> From: Philipp Hahn <phahn-oss@avm.de>
>
> Fix link to documentation, which has already been converted to reST.
> Also remove apostrophes which are no longer needed.
>
> Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
Applied to my watchdog-next branch.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 2/5] watchdog: Move `struct` before name
2026-05-05 9:26 [PATCH v3 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
2026-05-05 9:26 ` [PATCH v3 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
@ 2026-05-05 9:26 ` Philipp Hahn
2026-05-05 13:09 ` Guenter Roeck
2026-05-05 9:26 ` [PATCH v3 3/5] watchdog: Replace intermixed tab/space indent Philipp Hahn
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Philipp Hahn @ 2026-05-05 9:26 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel
From: Philipp Hahn <phahn-oss@avm.de>
Write `struct ` before the structure name as Sphinx otherwise uses the
following word after it. See
https://docs.kernel.org/watchdog/watchdog-api.html#environmental-monitoring
Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
.../convert_drivers_to_kernel_api.rst | 24 +++++++++----------
Documentation/watchdog/watchdog-api.rst | 2 +-
.../watchdog/watchdog-kernel-api.rst | 2 +-
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Documentation/watchdog/convert_drivers_to_kernel_api.rst b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
index 9eddb962f8e4c..004fe6ef76e94 100644
--- a/Documentation/watchdog/convert_drivers_to_kernel_api.rst
+++ b/Documentation/watchdog/convert_drivers_to_kernel_api.rst
@@ -11,12 +11,12 @@ This document shall guide you for this task. The necessary steps are described
as well as things to look out for.
-Remove the file_operations struct
+Remove the struct file_operations
---------------------------------
Old drivers define their own file_operations for actions like open(), write(),
etc... These are now handled by the framework and just call the driver when
-needed. So, in general, the 'file_operations' struct and assorted functions can
+needed. So, in general, the struct file_operations and assorted functions can
go. Only very few driver-specific details have to be moved to other functions.
Here is a overview of the functions and probably needed actions:
@@ -36,7 +36,7 @@ Here is a overview of the functions and probably needed actions:
from the driver:
WDIOC_GETSUPPORT:
- Returns the mandatory watchdog_info struct from the driver
+ Returns the mandatory struct watchdog_info from the driver
WDIOC_GETSTATUS:
Needs the status-callback defined, otherwise returns 0
@@ -88,8 +88,8 @@ refactoring. The rest can go.
Remove the miscdevice
---------------------
-Since the file_operations are gone now, you can also remove the 'struct
-miscdevice'. The framework will create it on watchdog_dev_register() called by
+Since the file_operations are gone now, you can also remove the struct
+miscdevice. The framework will create it on watchdog_dev_register() called by
watchdog_register_device()::
-static struct miscdevice s3c2410wdt_miscdev = {
@@ -113,10 +113,10 @@ them. Includes can be removed, too. For example::
Add the watchdog operations
---------------------------
-All possible callbacks are defined in 'struct watchdog_ops'. You can find it
+All possible callbacks are defined in struct watchdog_ops. You can find it
explained in watchdog-kernel-api.rst in this directory. start() and
owner must be set, the rest are optional. You will easily find corresponding
-functions in the old driver. Note that you will now get a pointer to the
+functions in the old driver. Note that you will now get a pointer to the struct
watchdog_device as a parameter to these functions, so you probably have to
change the function header. Other changes are most likely not needed, because
here simply happens the direct hardware access. If you have device-specific
@@ -151,12 +151,12 @@ A typical function-header change looks like::
Add the watchdog device
-----------------------
-Now we need to create a 'struct watchdog_device' and populate it with the
-necessary information for the framework. The struct is also explained in detail
+Now we need to create a struct watchdog_device and populate it with the
+necessary information for the framework. The structure is also explained in detail
in watchdog-kernel-api.rst in this directory. We pass it the mandatory
-watchdog_info struct and the newly created watchdog_ops. Often, old drivers
+struct watchdog_info and the newly created struct watchdog_ops. Often, old drivers
have their own record-keeping for things like bootstatus and timeout using
-static variables. Those have to be converted to use the members in
+static variables. Those have to be converted to use the members in struct
watchdog_device. Note that the timeout values are unsigned int. Some drivers
use signed int, so this has to be converted, too.
@@ -174,7 +174,7 @@ Handle the 'nowayout' feature
A few drivers use nowayout statically, i.e. there is no module parameter for it
and only CONFIG_WATCHDOG_NOWAYOUT determines if the feature is going to be
used. This needs to be converted by initializing the status variable of the
-watchdog_device like this::
+struct watchdog_device like this::
.status = WATCHDOG_NOWAYOUT_INIT_STATUS,
diff --git a/Documentation/watchdog/watchdog-api.rst b/Documentation/watchdog/watchdog-api.rst
index 78e228c272cf8..2c138eaa43397 100644
--- a/Documentation/watchdog/watchdog-api.rst
+++ b/Documentation/watchdog/watchdog-api.rst
@@ -158,7 +158,7 @@ available to ask what the device can do::
struct watchdog_info ident;
ioctl(fd, WDIOC_GETSUPPORT, &ident);
-the fields returned in the ident struct are:
+the fields returned in the struct watchdog_info are:
================ =============================================
identity a string identifying the watchdog driver
diff --git a/Documentation/watchdog/watchdog-kernel-api.rst b/Documentation/watchdog/watchdog-kernel-api.rst
index 5649c54cf6fbe..e2c1386c95509 100644
--- a/Documentation/watchdog/watchdog-kernel-api.rst
+++ b/Documentation/watchdog/watchdog-kernel-api.rst
@@ -257,7 +257,7 @@ bit-operations. The status bits that are defined are:
To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog
timer device) you can either:
- * set it statically in your watchdog_device struct with
+ * set it statically in your struct watchdog_device with
.status = WATCHDOG_NOWAYOUT_INIT_STATUS,
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 3/5] watchdog: Replace intermixed tab/space indent
2026-05-05 9:26 [PATCH v3 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
2026-05-05 9:26 ` [PATCH v3 1/5] watchdog: Change suffix .txt to .rst in references Philipp Hahn
2026-05-05 9:26 ` [PATCH v3 2/5] watchdog: Move `struct` before name Philipp Hahn
@ 2026-05-05 9:26 ` Philipp Hahn
2026-05-05 9:26 ` [PATCH v3 4/5] watchdog: Separate kind of documentation Philipp Hahn
2026-05-05 9:26 ` [PATCH v3 5/5] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
4 siblings, 0 replies; 10+ messages in thread
From: Philipp Hahn @ 2026-05-05 9:26 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel
From: Philipp Hahn <phahn-oss@avm.de>
Consistently indent all lines with tabs instead of having one line using
blanks.
Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
Documentation/watchdog/watchdog-api.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/watchdog/watchdog-api.rst b/Documentation/watchdog/watchdog-api.rst
index 2c138eaa43397..78d0940155b13 100644
--- a/Documentation/watchdog/watchdog-api.rst
+++ b/Documentation/watchdog/watchdog-api.rst
@@ -161,7 +161,7 @@ available to ask what the device can do::
the fields returned in the struct watchdog_info are:
================ =============================================
- identity a string identifying the watchdog driver
+ identity a string identifying the watchdog driver
firmware_version the firmware version of the card if available
options a flags describing what the device supports
================ =============================================
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 4/5] watchdog: Separate kind of documentation
2026-05-05 9:26 [PATCH v3 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
` (2 preceding siblings ...)
2026-05-05 9:26 ` [PATCH v3 3/5] watchdog: Replace intermixed tab/space indent Philipp Hahn
@ 2026-05-05 9:26 ` Philipp Hahn
2026-05-05 13:11 ` Guenter Roeck
2026-05-05 9:26 ` [PATCH v3 5/5] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
4 siblings, 1 reply; 10+ messages in thread
From: Philipp Hahn @ 2026-05-05 9:26 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel
From: Philipp Hahn <phahn-oss@avm.de>
Currently there are several (sub-)documents for "Generic kernel
infrastructure API" and several "driver specific" documents. Put each
one into its own sub-section.
Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
Documentation/watchdog/index.rst | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst
index 1cea24681e6bd..293ed05ba6b87 100644
--- a/Documentation/watchdog/index.rst
+++ b/Documentation/watchdog/index.rst
@@ -4,15 +4,25 @@
Watchdog Support
================
+Kernel infrastructure
+=====================
+
.. toctree::
:maxdepth: 1
- hpwdt
- mlx-wdt
- pcwd-watchdog
watchdog-api
watchdog-kernel-api
- watchdog-parameters
watchdog-pm
- wdt
convert_drivers_to_kernel_api
+
+Driver specific
+===============
+
+.. toctree::
+ :maxdepth: 1
+
+ watchdog-parameters
+ hpwdt
+ wdt
+ mlx-wdt
+ pcwd-watchdog
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v3 5/5] watchdog: Prefix WDT with ICS for clarity
2026-05-05 9:26 [PATCH v3 0/5] Cleanup Linux Watchdog documentation Philipp Hahn
` (3 preceding siblings ...)
2026-05-05 9:26 ` [PATCH v3 4/5] watchdog: Separate kind of documentation Philipp Hahn
@ 2026-05-05 9:26 ` Philipp Hahn
2026-05-05 13:12 ` Guenter Roeck
4 siblings, 1 reply; 10+ messages in thread
From: Philipp Hahn @ 2026-05-05 9:26 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck
Cc: Philipp Hahn, linux-watchdog, linux-doc, linux-kernel
From: Philipp Hahn <phahn-oss@avm.de>
`wdt.rst` is only about the Watchdog from "Industrial Computer Source"
(ICS). Change the title and rename the file to better express this.
Add missing SPDX license identifier `GPL-2.0-or-later` same as code to
silence `checkpatch`.
Fix wrong link to sample driver in drivers/watchdog/smsc37b787_wdt.c.
Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
---
Documentation/watchdog/{wdt.rst => ics-wdt.rst} | 8 +++++---
Documentation/watchdog/index.rst | 2 +-
drivers/watchdog/Kconfig | 10 ++++++----
drivers/watchdog/smsc37b787_wdt.c | 2 +-
4 files changed, 13 insertions(+), 9 deletions(-)
rename Documentation/watchdog/{wdt.rst => ics-wdt.rst} (91%)
diff --git a/Documentation/watchdog/wdt.rst b/Documentation/watchdog/ics-wdt.rst
similarity index 91%
rename from Documentation/watchdog/wdt.rst
rename to Documentation/watchdog/ics-wdt.rst
index d97b0361535b0..b0dc29e56358d 100644
--- a/Documentation/watchdog/wdt.rst
+++ b/Documentation/watchdog/ics-wdt.rst
@@ -1,6 +1,8 @@
-============================================================
-WDT Watchdog Timer Interfaces For The Linux Operating System
-============================================================
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+==========================================
+Industrial Computer Source Watchdog Driver
+==========================================
Last Reviewed: 10/05/2007
diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst
index 293ed05ba6b87..dbc702b31a43e 100644
--- a/Documentation/watchdog/index.rst
+++ b/Documentation/watchdog/index.rst
@@ -23,6 +23,6 @@ Driver specific
watchdog-parameters
hpwdt
- wdt
+ ics-wdt
mlx-wdt
pcwd-watchdog
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index dc78729ba2a5d..43c2ee69caada 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -2270,10 +2270,11 @@ config MIXCOMWD
Most people will say N.
config WDT
- tristate "WDT Watchdog timer"
+ tristate "ICS WDT500P/501P Watchdog timer"
depends on ISA
help
- If you have a WDT500P or WDT501P watchdog board, say Y here,
+ If you have an Industrial Computer Source (ICS) WDT500P or WDT501P
+ watchdog board, say Y here,
otherwise N. It is not possible to probe for this board, which means
that you have to inform the kernel about the IO port and IRQ that
is needed (you can do this via the io and irq parameters)
@@ -2304,10 +2305,11 @@ config PCIPCWATCHDOG
Most people will say N.
config WDTPCI
- tristate "PCI-WDT500/501 Watchdog timer"
+ tristate "ICS PCI-WDT500/501 Watchdog timer"
depends on PCI && HAS_IOPORT
help
- If you have a PCI-WDT500/501 watchdog board, say Y here, otherwise N.
+ If you have an Industrial Computer Source (ICS) PCI-WDT500/501 watchdog
+ board, say Y here, otherwise N.
If you have a PCI-WDT501 watchdog board then you can enable the
temperature sensor by setting the type parameter to 501.
diff --git a/drivers/watchdog/smsc37b787_wdt.c b/drivers/watchdog/smsc37b787_wdt.c
index 3011e1af00f98..9f2c2ab4e2f15 100644
--- a/drivers/watchdog/smsc37b787_wdt.c
+++ b/drivers/watchdog/smsc37b787_wdt.c
@@ -36,7 +36,7 @@
* mknod /dev/watchdog c 10 130
*
* For an example userspace keep-alive daemon, see:
- * Documentation/watchdog/wdt.rst
+ * samples/watchdog/watchdog-simple.c
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v3 5/5] watchdog: Prefix WDT with ICS for clarity
2026-05-05 9:26 ` [PATCH v3 5/5] watchdog: Prefix WDT with ICS for clarity Philipp Hahn
@ 2026-05-05 13:12 ` Guenter Roeck
0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2026-05-05 13:12 UTC (permalink / raw)
To: Philipp Hahn
Cc: Wim Van Sebroeck, Philipp Hahn, linux-watchdog, linux-doc,
linux-kernel
On Tue, May 05, 2026 at 11:26:16AM +0200, Philipp Hahn wrote:
> From: Philipp Hahn <phahn-oss@avm.de>
>
> `wdt.rst` is only about the Watchdog from "Industrial Computer Source"
> (ICS). Change the title and rename the file to better express this.
>
> Add missing SPDX license identifier `GPL-2.0-or-later` same as code to
> silence `checkpatch`.
>
> Fix wrong link to sample driver in drivers/watchdog/smsc37b787_wdt.c.
>
> Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
Applied to my watchdog-next branch.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 10+ messages in thread