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>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
ec90349a94
commit
8807f0afac
@@ -194,11 +194,15 @@ static int da9052_wdt_probe(struct platform_device *pdev)
|
||||
if (da9052->fault_log & DA9052_FAULTLOG_VDDFAULT)
|
||||
da9052_wdt->bootstatus |= WDIOF_POWERUNDER;
|
||||
|
||||
ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG,
|
||||
DA9052_CONTROLD_TWDSCALE, 0);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to disable watchdog bits, %d\n", ret);
|
||||
ret = da9052_reg_read(da9052, DA9052_CONTROL_D_REG);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Check if FW enabled the watchdog */
|
||||
if (ret & DA9052_CONTROLD_TWDSCALE) {
|
||||
/* Ensure proper initialization */
|
||||
da9052_wdt_start(da9052_wdt);
|
||||
set_bit(WDOG_HW_RUNNING, &da9052_wdt->status);
|
||||
}
|
||||
|
||||
return devm_watchdog_register_device(dev, &driver_data->wdt);
|
||||
|
||||
Reference in New Issue
Block a user