Lines Matching full:wdd

47 	struct watchdog_device	wdd;  member
59 struct qcom_wdt *to_qcom_wdt(struct watchdog_device *wdd) in to_qcom_wdt() argument
61 return container_of(wdd, struct qcom_wdt, wdd); in to_qcom_wdt()
66 struct watchdog_device *wdd = arg; in qcom_wdt_isr() local
68 watchdog_notify_pretimeout(wdd); in qcom_wdt_isr()
73 static int qcom_wdt_start(struct watchdog_device *wdd) in qcom_wdt_start() argument
75 struct qcom_wdt *wdt = to_qcom_wdt(wdd); in qcom_wdt_start()
76 unsigned int bark = wdd->timeout - wdd->pretimeout; in qcom_wdt_start()
81 writel(wdd->timeout * wdt->rate, wdt_addr(wdt, WDT_BITE_TIME)); in qcom_wdt_start()
86 static int qcom_wdt_stop(struct watchdog_device *wdd) in qcom_wdt_stop() argument
88 struct qcom_wdt *wdt = to_qcom_wdt(wdd); in qcom_wdt_stop()
94 static int qcom_wdt_ping(struct watchdog_device *wdd) in qcom_wdt_ping() argument
96 struct qcom_wdt *wdt = to_qcom_wdt(wdd); in qcom_wdt_ping()
102 static int qcom_wdt_set_timeout(struct watchdog_device *wdd, in qcom_wdt_set_timeout() argument
105 wdd->timeout = timeout; in qcom_wdt_set_timeout()
106 return qcom_wdt_start(wdd); in qcom_wdt_set_timeout()
109 static int qcom_wdt_set_pretimeout(struct watchdog_device *wdd, in qcom_wdt_set_pretimeout() argument
112 wdd->pretimeout = timeout; in qcom_wdt_set_pretimeout()
113 return qcom_wdt_start(wdd); in qcom_wdt_set_pretimeout()
116 static int qcom_wdt_restart(struct watchdog_device *wdd, unsigned long action, in qcom_wdt_restart() argument
119 struct qcom_wdt *wdt = to_qcom_wdt(wdd); in qcom_wdt_restart()
143 static int qcom_wdt_is_running(struct watchdog_device *wdd) in qcom_wdt_is_running() argument
145 struct qcom_wdt *wdt = to_qcom_wdt(wdd); in qcom_wdt_is_running()
248 "wdt_bark", &wdt->wdd); in qcom_wdt_probe()
252 wdt->wdd.info = &qcom_wdt_pt_info; in qcom_wdt_probe()
253 wdt->wdd.pretimeout = 1; in qcom_wdt_probe()
258 wdt->wdd.info = &qcom_wdt_info; in qcom_wdt_probe()
261 wdt->wdd.ops = &qcom_wdt_ops; in qcom_wdt_probe()
262 wdt->wdd.min_timeout = 1; in qcom_wdt_probe()
263 wdt->wdd.max_timeout = 0x10000000U / wdt->rate; in qcom_wdt_probe()
264 wdt->wdd.parent = dev; in qcom_wdt_probe()
268 wdt->wdd.bootstatus = WDIOF_CARDRESET; in qcom_wdt_probe()
275 wdt->wdd.timeout = min(wdt->wdd.max_timeout, 30U); in qcom_wdt_probe()
276 watchdog_init_timeout(&wdt->wdd, 0, dev); in qcom_wdt_probe()
284 if (qcom_wdt_is_running(&wdt->wdd)) { in qcom_wdt_probe()
285 qcom_wdt_start(&wdt->wdd); in qcom_wdt_probe()
286 set_bit(WDOG_HW_RUNNING, &wdt->wdd.status); in qcom_wdt_probe()
289 ret = devm_watchdog_register_device(dev, &wdt->wdd); in qcom_wdt_probe()
301 if (watchdog_active(&wdt->wdd)) in qcom_wdt_suspend()
302 qcom_wdt_stop(&wdt->wdd); in qcom_wdt_suspend()
311 if (watchdog_active(&wdt->wdd)) in qcom_wdt_resume()
312 qcom_wdt_start(&wdt->wdd); in qcom_wdt_resume()