Lines Matching refs:wdd
68 struct watchdog_device wdd; member
86 static int tegra_wdt_start(struct watchdog_device *wdd) in tegra_wdt_start() argument
88 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_start()
109 (wdd->timeout << WDT_CFG_PERIOD_SHIFT) | in tegra_wdt_start()
118 static int tegra_wdt_stop(struct watchdog_device *wdd) in tegra_wdt_stop() argument
120 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_stop()
129 static int tegra_wdt_ping(struct watchdog_device *wdd) in tegra_wdt_ping() argument
131 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_ping()
138 static int tegra_wdt_set_timeout(struct watchdog_device *wdd, in tegra_wdt_set_timeout() argument
141 wdd->timeout = timeout; in tegra_wdt_set_timeout()
143 if (watchdog_active(wdd)) { in tegra_wdt_set_timeout()
144 tegra_wdt_stop(wdd); in tegra_wdt_set_timeout()
145 return tegra_wdt_start(wdd); in tegra_wdt_set_timeout()
151 static unsigned int tegra_wdt_get_timeleft(struct watchdog_device *wdd) in tegra_wdt_get_timeleft() argument
153 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_get_timeleft()
170 return (((3 - exp) * wdd->timeout) + count) / 4; in tegra_wdt_get_timeleft()
192 struct watchdog_device *wdd; in tegra_wdt_probe() local
217 wdd = &wdt->wdd; in tegra_wdt_probe()
218 wdd->timeout = heartbeat; in tegra_wdt_probe()
219 wdd->info = &tegra_wdt_info; in tegra_wdt_probe()
220 wdd->ops = &tegra_wdt_ops; in tegra_wdt_probe()
221 wdd->min_timeout = MIN_WDT_TIMEOUT; in tegra_wdt_probe()
222 wdd->max_timeout = MAX_WDT_TIMEOUT; in tegra_wdt_probe()
223 wdd->parent = &pdev->dev; in tegra_wdt_probe()
225 watchdog_set_drvdata(wdd, wdt); in tegra_wdt_probe()
227 watchdog_set_nowayout(wdd, nowayout); in tegra_wdt_probe()
229 ret = watchdog_register_device(wdd); in tegra_wdt_probe()
249 tegra_wdt_stop(&wdt->wdd); in tegra_wdt_remove()
251 watchdog_unregister_device(&wdt->wdd); in tegra_wdt_remove()
263 if (watchdog_active(&wdt->wdd)) in tegra_wdt_runtime_suspend()
264 tegra_wdt_stop(&wdt->wdd); in tegra_wdt_runtime_suspend()
273 if (watchdog_active(&wdt->wdd)) in tegra_wdt_runtime_resume()
274 tegra_wdt_start(&wdt->wdd); in tegra_wdt_runtime_resume()