Lines Matching refs:wdd

93 static int da9063_wdt_start(struct watchdog_device *wdd)
95 struct da9063 *da9063 = watchdog_get_drvdata(wdd);
98 ret = da9063_wdt_update_timeout(da9063, wdd->timeout);
106 static int da9063_wdt_stop(struct watchdog_device *wdd)
108 struct da9063 *da9063 = watchdog_get_drvdata(wdd);
119 static int da9063_wdt_ping(struct watchdog_device *wdd)
121 struct da9063 *da9063 = watchdog_get_drvdata(wdd);
133 static int da9063_wdt_set_timeout(struct watchdog_device *wdd,
136 struct da9063 *da9063 = watchdog_get_drvdata(wdd);
149 if (watchdog_active(wdd))
156 wdd->timeout = wdt_timeout[da9063_wdt_timeout_to_sel(timeout)];
161 static int da9063_wdt_restart(struct watchdog_device *wdd, unsigned long action,
164 struct da9063 *da9063 = watchdog_get_drvdata(wdd);
194 struct watchdog_device *wdd;
204 wdd = devm_kzalloc(dev, sizeof(*wdd), GFP_KERNEL);
205 if (!wdd)
208 wdd->info = &da9063_watchdog_info;
209 wdd->ops = &da9063_watchdog_ops;
210 wdd->min_timeout = DA9063_WDT_MIN_TIMEOUT;
211 wdd->max_timeout = DA9063_WDT_MAX_TIMEOUT;
212 wdd->min_hw_heartbeat_ms = DA9063_RESET_PROTECTION_MS;
213 wdd->parent = dev;
214 wdd->status = WATCHDOG_NOWAYOUT_INIT_STATUS;
216 watchdog_set_restart_priority(wdd, 128);
217 watchdog_set_drvdata(wdd, da9063);
219 wdd->timeout = DA9063_WDG_TIMEOUT;
224 wdd->timeout = timeout;
227 watchdog_init_timeout(wdd, 0, dev);
228 da9063_wdt_set_timeout(wdd, wdd->timeout);
232 da9063_wdt_update_timeout(da9063, wdd->timeout);
233 set_bit(WDOG_HW_RUNNING, &wdd->status);
236 return devm_watchdog_register_device(dev, wdd);