File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ static int da9052_wdt_ping(struct watchdog_device *wdt_dev)
135
135
}
136
136
137
137
static const struct watchdog_info da9052_wdt_info = {
138
- .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING ,
138
+ .options = WDIOF_SETTIMEOUT |
139
+ WDIOF_KEEPALIVEPING |
140
+ WDIOF_CARDRESET |
141
+ WDIOF_OVERHEAT |
142
+ WDIOF_POWERUNDER ,
139
143
.identity = "DA9052 Watchdog" ,
140
144
};
141
145
@@ -169,6 +173,13 @@ static int da9052_wdt_probe(struct platform_device *pdev)
169
173
da9052_wdt -> parent = dev ;
170
174
watchdog_set_drvdata (da9052_wdt , driver_data );
171
175
176
+ if (da9052 -> fault_log & DA9052_FAULTLOG_TWDERROR )
177
+ da9052_wdt -> bootstatus |= WDIOF_CARDRESET ;
178
+ if (da9052 -> fault_log & DA9052_FAULTLOG_TEMPOVER )
179
+ da9052_wdt -> bootstatus |= WDIOF_OVERHEAT ;
180
+ if (da9052 -> fault_log & DA9052_FAULTLOG_VDDFAULT )
181
+ da9052_wdt -> bootstatus |= WDIOF_POWERUNDER ;
182
+
172
183
ret = da9052_reg_update (da9052 , DA9052_CONTROL_D_REG ,
173
184
DA9052_CONTROLD_TWDSCALE , 0 );
174
185
if (ret < 0 ) {
You can’t perform that action at this time.
0 commit comments