Lines Matching full:wdd
60 struct watchdog_device wdd; member
78 static int tegra_wdt_start(struct watchdog_device *wdd) in tegra_wdt_start() argument
80 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_start()
101 (wdd->timeout << WDT_CFG_PERIOD_SHIFT) | in tegra_wdt_start()
110 static int tegra_wdt_stop(struct watchdog_device *wdd) in tegra_wdt_stop() argument
112 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_stop()
121 static int tegra_wdt_ping(struct watchdog_device *wdd) in tegra_wdt_ping() argument
123 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_ping()
130 static int tegra_wdt_set_timeout(struct watchdog_device *wdd, in tegra_wdt_set_timeout() argument
133 wdd->timeout = timeout; in tegra_wdt_set_timeout()
135 if (watchdog_active(wdd)) { in tegra_wdt_set_timeout()
136 tegra_wdt_stop(wdd); in tegra_wdt_set_timeout()
137 return tegra_wdt_start(wdd); in tegra_wdt_set_timeout()
143 static unsigned int tegra_wdt_get_timeleft(struct watchdog_device *wdd) in tegra_wdt_get_timeleft() argument
145 struct tegra_wdt *wdt = watchdog_get_drvdata(wdd); in tegra_wdt_get_timeleft()
162 return (((3 - exp) * wdd->timeout) + count) / 4; in tegra_wdt_get_timeleft()
185 struct watchdog_device *wdd; in tegra_wdt_probe() local
208 wdd = &wdt->wdd; in tegra_wdt_probe()
209 wdd->timeout = heartbeat; in tegra_wdt_probe()
210 wdd->info = &tegra_wdt_info; in tegra_wdt_probe()
211 wdd->ops = &tegra_wdt_ops; in tegra_wdt_probe()
212 wdd->min_timeout = MIN_WDT_TIMEOUT; in tegra_wdt_probe()
213 wdd->max_timeout = MAX_WDT_TIMEOUT; in tegra_wdt_probe()
214 wdd->parent = dev; in tegra_wdt_probe()
216 watchdog_set_drvdata(wdd, wdt); in tegra_wdt_probe()
218 watchdog_set_nowayout(wdd, nowayout); in tegra_wdt_probe()
220 watchdog_stop_on_unregister(wdd); in tegra_wdt_probe()
221 ret = devm_watchdog_register_device(dev, wdd); in tegra_wdt_probe()
237 if (watchdog_active(&wdt->wdd)) in tegra_wdt_suspend()
238 tegra_wdt_stop(&wdt->wdd); in tegra_wdt_suspend()
247 if (watchdog_active(&wdt->wdd)) in tegra_wdt_resume()
248 tegra_wdt_start(&wdt->wdd); in tegra_wdt_resume()