Re: [PATCH v4 1/2] watchdog: Add a new flag WDIOF_STOP_MAYSLEEP

From: Guenter Roeck
Date: Wed Mar 05 2025 - 18:05:56 EST


On 3/5/25 02:10, George Cherian wrote:
A new option flag is added to watchdog_info. This helps the watchdog
core to check whether stop functions would sleep or not.
The option flags of individual drivers are also updated accordingly.

Signed-off-by: George Cherian <george.cherian@xxxxxxxxxxx>
---
drivers/watchdog/advantech_ec_wdt.c | 3 ++-
drivers/watchdog/arm_smc_wdt.c | 3 ++-
drivers/watchdog/armada_37xx_wdt.c | 2 +-


... and many more. Sorry, I didn't expect that this would touch
that many drivers. My bad.

Let's do the opposite instead: Introduce WDIOF_STOP_NOSLEEP,
and let drivers opt in instead of opting out.

I still have to look into the other feedback. I think someone
suggested to introduce a callback instead, which would stop the
watchdog at runtime if needed (especially during kdump).
That may be a better solution than having a module parameter.

Either case, please separate driver patches from the patches
introducing the new flag. Since the flag is opt-in, that should
be ok - drivers supporting it can be modified over time.

Thanks,
Guenter