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()
219 struct watchdog_device *wdd; in da9063_wdt_probe() local
229 wdd = devm_kzalloc(dev, sizeof(*wdd), GFP_KERNEL); in da9063_wdt_probe()
230 if (!wdd) in da9063_wdt_probe()
235 wdd->info = &da9063_watchdog_info; in da9063_wdt_probe()
236 wdd->ops = &da9063_watchdog_ops; in da9063_wdt_probe()
237 wdd->min_timeout = DA9063_WDT_MIN_TIMEOUT; in da9063_wdt_probe()
238 wdd->max_timeout = DA9063_WDT_MAX_TIMEOUT; in da9063_wdt_probe()
239 wdd->min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS; in da9063_wdt_probe()
240 wdd->parent = dev; in da9063_wdt_probe()
241 wdd->status = WATCHDOG_NOWAYOUT_INIT_STATUS; in da9063_wdt_probe()
243 watchdog_set_restart_priority(wdd, 128); in da9063_wdt_probe()
244 watchdog_set_drvdata(wdd, da9063); in da9063_wdt_probe()
245 dev_set_drvdata(dev, wdd); in da9063_wdt_probe()
247 wdd->timeout = DA9063_WDG_TIMEOUT; in da9063_wdt_probe()
252 wdd->timeout = timeout; in da9063_wdt_probe()
255 watchdog_init_timeout(wdd, 0, dev); in da9063_wdt_probe()
256 da9063_wdt_set_timeout(wdd, wdd->timeout); in da9063_wdt_probe()
260 da9063_wdt_update_timeout(da9063, wdd->timeout); in da9063_wdt_probe()
261 set_bit(WDOG_HW_RUNNING, &wdd->status); in da9063_wdt_probe()
264 return devm_watchdog_register_device(dev, wdd); in da9063_wdt_probe()
269 struct watchdog_device *wdd = dev_get_drvdata(dev); in da9063_wdt_suspend() local
274 if (watchdog_active(wdd)) in da9063_wdt_suspend()
275 return da9063_wdt_stop(wdd); in da9063_wdt_suspend()
282 struct watchdog_device *wdd = dev_get_drvdata(dev); in da9063_wdt_resume() local
287 if (watchdog_active(wdd)) in da9063_wdt_resume()
288 return da9063_wdt_start(wdd); in da9063_wdt_resume()