[PATCH v3 0/6] watchdog: w83627hf_wdt: Convert driver to the driver model and add minute support
From: Paul Louvel
Date: Sun Oct 04 2026 - 08:13:34 EST
Hi,
This series aims to improve driver readability and convert it to the
Linux driver model by means of a platform driver.
Furthermore, support for minute-based counting has been added to allow
timeout values longer than 255 seconds. When setting a timeout value
that is not a multiple of 60 seconds, the value is rounded up to the
nearest multiple.
Notes:
- PATCH #1: I could not introduce a macro for each hard-coded value in
this driver, since some datasheets are not available (to my
knowledge) on the internet.
- PATCH #7: I have moved the code that refreshes or stops the watchdog
timer out of the w83627hf_init() function and into the wdt_probe()
function. Keeping it there would have led to code duplication.
Since the timer has a granularity of at most one second, this does
not introduce an unexpected reboot: the timer cannot expire in
between, as at most a few milliseconds would have elapsed (the
margin is < 1s anyway).
This series was tested on a x86-64 board featuring a Nuvoton NCT6126
Super I/O chip.
Best regards,
To: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>
To: Guenter Roeck <linux@xxxxxxxxxxxx>
Cc: linux-watchdog@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxx>
Signed-off-by: Paul Louvel <paul.louvel@xxxxxxxxxxx>
---
Changes in v3:
- Drop the platform device resource for the Super I/O configuration port:
claiming the shared 0x2e/0x4e port could break concurrent
request_muxed_region() users on module unload (Sashiko). The port
address is now passed via platform data together with the
configuration keys.
- Patches 5 and 6 are merged into "Store Super I/O configurations in platform data".
- Validate platform_get_device_id() and platform_data in probe before
use.
- struct watchdog_device parent member is now assigned to pdev device
instance.
- Re-parent this series on 7.3-rc5.
- Remove the dependency in the cover letter since it was merged.
- Link to v2: https://patch.msgid.link/20260726-w83627hf_wdt-improvements-v2-0-3645a2a6c022@xxxxxxxxxxx
Changes in v2:
- Initialize res stack variable in PATCH #5.
- Reworded PATCH #1. Describe the introduction of BIT().
- Remove the usage in PATCH #8 of goto in error path.
- Dropped PATCH #9. Squashed with PATCH #2.
- Link to v1: https://patch.msgid.link/20260725-w83627hf_wdt-improvements-v1-0-4e9a1b4e8297@xxxxxxxxxxx
---
Paul Louvel (6):
watchdog: w83627hf_wdt: Replace magic numbers with descriptive macros
watchdog: w83627hf_wdt: Convert to platform driver model
watchdog: w83627hf_wdt: Move register offsets into driver data
watchdog: w83627hf_wdt: Store Super I/O configurations in platform data
watchdog: w83627hf_wdt: Add minute mode counting
watchdog: w83627hf_wdt: Report all initialization failures in probe
drivers/watchdog/w83627hf_wdt.c | 443 +++++++++++++++++++++++++---------------
1 file changed, 282 insertions(+), 161 deletions(-)
---
base-commit: 028ef9c96e96197026887c0f092424679298aae8
change-id: 20260713-w83627hf_wdt-improvements-ba2364157d6e
prerequisite-change-id: 20260705-w83627hf_wdt-nct6126d-9a016bf7c936:v4
prerequisite-patch-id: 1162062ebf31e7c2c70ff52b79118b67b00c396b
prerequisite-patch-id: 9638243b3ade2a4e9c3e94664343b235e5cb806d
prerequisite-patch-id: 73803f726f2fab91516b429f79a59c2d3a574cfe
Best regards,
--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com