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 return tegra_wdt_start(wdd); in tegra_wdt_set_timeout()
149 static unsigned int tegra_wdt_get_timeleft(struct watchdog_device *wdd) in tegra_wdt_get_timeleft() argument
151 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_get_timeleft()
168 return (((3 - exp) * wdd->timeout) + count) / 4; in tegra_wdt_get_timeleft()
190 struct watchdog_device *wdd; in tegra_wdt_probe() local
215 wdd = &wdt->wdd; in tegra_wdt_probe()
216 wdd->timeout = heartbeat; in tegra_wdt_probe()
217 wdd->info = &tegra_wdt_info; in tegra_wdt_probe()
218 wdd->ops = &tegra_wdt_ops; in tegra_wdt_probe()
219 wdd->min_timeout = MIN_WDT_TIMEOUT; in tegra_wdt_probe()
220 wdd->max_timeout = MAX_WDT_TIMEOUT; in tegra_wdt_probe()
222 watchdog_set_drvdata(wdd, wdt); in tegra_wdt_probe()
224 watchdog_set_nowayout(wdd, nowayout); in tegra_wdt_probe()
226 ret = watchdog_register_device(wdd); in tegra_wdt_probe()
246 tegra_wdt_stop(&wdt->wdd); in tegra_wdt_remove()
248 watchdog_unregister_device(&wdt->wdd); in tegra_wdt_remove()
260 if (watchdog_active(&wdt->wdd)) in tegra_wdt_runtime_suspend()
261 tegra_wdt_stop(&wdt->wdd); in tegra_wdt_runtime_suspend()
270 if (watchdog_active(&wdt->wdd)) in tegra_wdt_runtime_resume()
271 tegra_wdt_start(&wdt->wdd); in tegra_wdt_runtime_resume()