File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -194,11 +194,15 @@ static int da9052_wdt_probe(struct platform_device *pdev)
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 );
You can’t perform that action at this time.
0 commit comments