Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: da9052_wdt: do not disable wdt during probe

If the watchog is started by the bootloader, we do not want the watchdog
to be disabled.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-3-a38a560fef0e@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Marcus Folkesson and committed by
Wim Van Sebroeck
8807f0af ec90349a

+8 -4
+8 -4
drivers/watchdog/da9052_wdt.c
··· 194 194 if (da9052->fault_log & DA9052_FAULTLOG_VDDFAULT) 195 195 da9052_wdt->bootstatus |= WDIOF_POWERUNDER; 196 196 197 - ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, 198 - DA9052_CONTROLD_TWDSCALE, 0); 199 - if (ret < 0) { 200 - dev_err(dev, "Failed to disable watchdog bits, %d\n", ret); 197 + ret = da9052_reg_read(da9052, DA9052_CONTROL_D_REG); 198 + if (ret < 0) 201 199 return ret; 200 + 201 + /* Check if FW enabled the watchdog */ 202 + if (ret & DA9052_CONTROLD_TWDSCALE) { 203 + /* Ensure proper initialization */ 204 + da9052_wdt_start(da9052_wdt); 205 + set_bit(WDOG_HW_RUNNING, &da9052_wdt->status); 202 206 } 203 207 204 208 return devm_watchdog_register_device(dev, &driver_data->wdt);