Re: [PATCH v2 4/4] watchdog: da9052_wdt: respect TWDMIN

From: Guenter Roeck
Date: Tue Mar 25 2025 - 09:29:56 EST


On Tue, Mar 25, 2025 at 08:27:15AM +0100, Marcus Folkesson wrote:
> We have to wait at least the minimium time for the watchdog window
> (TWDMIN) before writings to the wdt register after the
> watchdog is activated.
> Otherwise the chip will assert TWD_ERROR and power down to reset mode.
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@xxxxxxxxx>

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

> ---
> drivers/watchdog/da9052_wdt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
> index b821006fca70480bf3b23a62bded4e66851a537e..1e49cbae7eaec3015264dec891032a56f56e36cc 100644
> --- a/drivers/watchdog/da9052_wdt.c
> +++ b/drivers/watchdog/da9052_wdt.c
> @@ -179,6 +179,7 @@ static int da9052_wdt_probe(struct platform_device *pdev)
> da9052_wdt = &driver_data->wdt;
>
> da9052_wdt->timeout = DA9052_DEF_TIMEOUT;
> + da9052_wdt->min_hw_heartbeat_ms = DA9052_TWDMIN;
> da9052_wdt->info = &da9052_wdt_info;
> da9052_wdt->ops = &da9052_wdt_ops;
> da9052_wdt->parent = dev;
>
> --
> 2.48.1
>
>