Lines Matching refs:wdd
64 struct watchdog_device wdd; member
78 static int wdt_setload(struct watchdog_device *wdd, unsigned int timeout) in wdt_setload() argument
80 struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); in wdt_setload()
99 wdd->timeout = div_u64((load + 1) * 2 + (rate / 2), rate); in wdt_setload()
106 static unsigned int wdt_timeleft(struct watchdog_device *wdd) in wdt_timeleft() argument
108 struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); in wdt_timeleft()
124 static int wdt_config(struct watchdog_device *wdd, bool ping) in wdt_config() argument
126 struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); in wdt_config()
158 static int wdt_ping(struct watchdog_device *wdd) in wdt_ping() argument
160 return wdt_config(wdd, true); in wdt_ping()
164 static int wdt_enable(struct watchdog_device *wdd) in wdt_enable() argument
166 return wdt_config(wdd, false); in wdt_enable()
170 static int wdt_disable(struct watchdog_device *wdd) in wdt_disable() argument
172 struct sp805_wdt *wdt = watchdog_get_drvdata(wdd); in wdt_disable()
227 wdt->wdd.info = &wdt_info; in sp805_wdt_probe()
228 wdt->wdd.ops = &wdt_ops; in sp805_wdt_probe()
229 wdt->wdd.parent = &adev->dev; in sp805_wdt_probe()
232 watchdog_set_nowayout(&wdt->wdd, nowayout); in sp805_wdt_probe()
233 watchdog_set_drvdata(&wdt->wdd, wdt); in sp805_wdt_probe()
234 wdt_setload(&wdt->wdd, DEFAULT_TIMEOUT); in sp805_wdt_probe()
236 ret = watchdog_register_device(&wdt->wdd); in sp805_wdt_probe()
256 watchdog_unregister_device(&wdt->wdd); in sp805_wdt_remove()
257 watchdog_set_drvdata(&wdt->wdd, NULL); in sp805_wdt_remove()
266 if (watchdog_active(&wdt->wdd)) in sp805_wdt_suspend()
267 return wdt_disable(&wdt->wdd); in sp805_wdt_suspend()
276 if (watchdog_active(&wdt->wdd)) in sp805_wdt_resume()
277 return wdt_enable(&wdt->wdd); in sp805_wdt_resume()