Lines Matching full:wdd

75 	struct watchdog_device		wdd;  member
197 static int kempld_wdt_set_timeout(struct watchdog_device *wdd, in kempld_wdt_set_timeout() argument
200 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_set_timeout()
220 wdd->timeout = timeout; in kempld_wdt_set_timeout()
224 static int kempld_wdt_set_pretimeout(struct watchdog_device *wdd, in kempld_wdt_set_pretimeout() argument
227 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_set_pretimeout()
237 if (pretimeout > wdd->timeout) in kempld_wdt_set_pretimeout()
248 wdd->timeout - pretimeout); in kempld_wdt_set_pretimeout()
276 wdt_data->wdd.timeout = pretimeout + timeout; in kempld_wdt_update_timeouts()
279 static int kempld_wdt_start(struct watchdog_device *wdd) in kempld_wdt_start() argument
281 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_start()
286 ret = kempld_wdt_set_timeout(wdd, wdd->timeout); in kempld_wdt_start()
304 static int kempld_wdt_stop(struct watchdog_device *wdd) in kempld_wdt_stop() argument
306 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_stop()
324 static int kempld_wdt_keepalive(struct watchdog_device *wdd) in kempld_wdt_keepalive() argument
326 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_keepalive()
336 static long kempld_wdt_ioctl(struct watchdog_device *wdd, unsigned int cmd, in kempld_wdt_ioctl() argument
339 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_ioctl()
349 ret = kempld_wdt_set_pretimeout(wdd, new_value); in kempld_wdt_ioctl()
352 ret = kempld_wdt_keepalive(wdd); in kempld_wdt_ioctl()
362 static int kempld_wdt_probe_stages(struct watchdog_device *wdd) in kempld_wdt_probe_stages() argument
364 struct kempld_wdt_data *wdt_data = watchdog_get_drvdata(wdd); in kempld_wdt_probe_stages()
439 struct watchdog_device *wdd; in kempld_wdt_probe() local
448 wdd = &wdt_data->wdd; in kempld_wdt_probe()
449 wdd->parent = dev; in kempld_wdt_probe()
464 wdd->info = &kempld_wdt_info; in kempld_wdt_probe()
465 wdd->ops = &kempld_wdt_ops; in kempld_wdt_probe()
467 watchdog_set_drvdata(wdd, wdt_data); in kempld_wdt_probe()
468 watchdog_set_nowayout(wdd, nowayout); in kempld_wdt_probe()
470 ret = kempld_wdt_probe_stages(wdd); in kempld_wdt_probe()
474 kempld_wdt_set_timeout(wdd, timeout); in kempld_wdt_probe()
475 kempld_wdt_set_pretimeout(wdd, pretimeout); in kempld_wdt_probe()
485 watchdog_stop_on_reboot(wdd); in kempld_wdt_probe()
486 watchdog_stop_on_unregister(wdd); in kempld_wdt_probe()
487 ret = devm_watchdog_register_device(dev, wdd); in kempld_wdt_probe()
491 dev_info(dev, "Watchdog registered with %ds timeout\n", wdd->timeout); in kempld_wdt_probe()
502 struct watchdog_device *wdd = &wdt_data->wdd; in kempld_wdt_suspend() local
511 return kempld_wdt_stop(wdd); in kempld_wdt_suspend()
520 struct watchdog_device *wdd = &wdt_data->wdd; in kempld_wdt_resume() local
527 return kempld_wdt_start(wdd); in kempld_wdt_resume()
529 return kempld_wdt_stop(wdd); in kempld_wdt_resume()