Lines Matching full:wdd
97 static int da9063_wdt_start(struct watchdog_device *wdd) in da9063_wdt_start() argument
99 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_start()
102 ret = da9063_wdt_update_timeout(da9063, wdd->timeout); in da9063_wdt_start()
110 static int da9063_wdt_stop(struct watchdog_device *wdd) in da9063_wdt_stop() argument
112 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_stop()
123 static int da9063_wdt_ping(struct watchdog_device *wdd) in da9063_wdt_ping() argument
125 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_ping()
144 static int da9063_wdt_set_timeout(struct watchdog_device *wdd, in da9063_wdt_set_timeout() argument
147 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_set_timeout()
160 if (watchdog_active(wdd)) in da9063_wdt_set_timeout()
167 wdd->timeout = wdt_timeout[da9063_wdt_timeout_to_sel(timeout)]; in da9063_wdt_set_timeout()
172 static int da9063_wdt_restart(struct watchdog_device *wdd, unsigned long action, in da9063_wdt_restart() argument
175 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_restart()
210 struct watchdog_device *wdd; in da9063_wdt_probe() local
220 wdd = devm_kzalloc(dev, sizeof(*wdd), GFP_KERNEL); in da9063_wdt_probe()
221 if (!wdd) in da9063_wdt_probe()
226 wdd->info = &da9063_watchdog_info; in da9063_wdt_probe()
227 wdd->ops = &da9063_watchdog_ops; in da9063_wdt_probe()
228 wdd->min_timeout = DA9063_WDT_MIN_TIMEOUT; in da9063_wdt_probe()
229 wdd->max_timeout = DA9063_WDT_MAX_TIMEOUT; in da9063_wdt_probe()
230 wdd->min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS; in da9063_wdt_probe()
231 wdd->parent = dev; in da9063_wdt_probe()
232 wdd->status = WATCHDOG_NOWAYOUT_INIT_STATUS; in da9063_wdt_probe()
234 watchdog_set_restart_priority(wdd, 128); in da9063_wdt_probe()
235 watchdog_set_drvdata(wdd, da9063); in da9063_wdt_probe()
236 dev_set_drvdata(dev, wdd); in da9063_wdt_probe()
238 wdd->timeout = DA9063_WDG_TIMEOUT; in da9063_wdt_probe()
243 wdd->timeout = timeout; in da9063_wdt_probe()
246 watchdog_init_timeout(wdd, 0, dev); in da9063_wdt_probe()
247 da9063_wdt_set_timeout(wdd, wdd->timeout); in da9063_wdt_probe()
251 da9063_wdt_update_timeout(da9063, wdd->timeout); in da9063_wdt_probe()
252 set_bit(WDOG_HW_RUNNING, &wdd->status); in da9063_wdt_probe()
255 return devm_watchdog_register_device(dev, wdd); in da9063_wdt_probe()
260 struct watchdog_device *wdd = dev_get_drvdata(dev); in da9063_wdt_suspend() local
265 if (watchdog_active(wdd)) in da9063_wdt_suspend()
266 return da9063_wdt_stop(wdd); in da9063_wdt_suspend()
273 struct watchdog_device *wdd = dev_get_drvdata(dev); in da9063_wdt_resume() local
278 if (watchdog_active(wdd)) in da9063_wdt_resume()
279 return da9063_wdt_start(wdd); in da9063_wdt_resume()