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