Lines Matching full:wdog
129 static int imx7ulp_wdt_enable(struct watchdog_device *wdog, bool enable) in imx7ulp_wdt_enable() argument
131 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_enable()
147 static int imx7ulp_wdt_ping(struct watchdog_device *wdog) in imx7ulp_wdt_ping() argument
149 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_ping()
156 static int imx7ulp_wdt_start(struct watchdog_device *wdog) in imx7ulp_wdt_start() argument
158 return imx7ulp_wdt_enable(wdog, true); in imx7ulp_wdt_start()
161 static int imx7ulp_wdt_stop(struct watchdog_device *wdog) in imx7ulp_wdt_stop() argument
163 return imx7ulp_wdt_enable(wdog, false); in imx7ulp_wdt_stop()
186 static int imx7ulp_wdt_set_timeout(struct watchdog_device *wdog, in imx7ulp_wdt_set_timeout() argument
189 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_set_timeout()
203 wdog->timeout = timeout; in imx7ulp_wdt_set_timeout()
207 static int imx7ulp_wdt_restart(struct watchdog_device *wdog, in imx7ulp_wdt_restart() argument
210 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_restart()
213 ret = imx7ulp_wdt_enable(wdog, true); in imx7ulp_wdt_restart()
221 /* wait for wdog to fire */ in imx7ulp_wdt_restart()
255 /* unlock the wdog for reconfiguration */ in _imx7ulp_wdt_init()
315 struct watchdog_device *wdog; in imx7ulp_wdt_probe() local
334 /* The WDOG may need to do external reset through dedicated pin */ in imx7ulp_wdt_probe()
337 wdog = &imx7ulp_wdt->wdd; in imx7ulp_wdt_probe()
338 wdog->info = &imx7ulp_wdt_info; in imx7ulp_wdt_probe()
339 wdog->ops = &imx7ulp_wdt_ops; in imx7ulp_wdt_probe()
340 wdog->min_timeout = 1; in imx7ulp_wdt_probe()
341 wdog->max_timeout = MAX_TIMEOUT; in imx7ulp_wdt_probe()
342 wdog->parent = dev; in imx7ulp_wdt_probe()
343 wdog->timeout = DEFAULT_TIMEOUT; in imx7ulp_wdt_probe()
345 watchdog_init_timeout(wdog, 0, dev); in imx7ulp_wdt_probe()
346 watchdog_stop_on_reboot(wdog); in imx7ulp_wdt_probe()
347 watchdog_stop_on_unregister(wdog); in imx7ulp_wdt_probe()
348 watchdog_set_drvdata(wdog, imx7ulp_wdt); in imx7ulp_wdt_probe()
351 ret = imx7ulp_wdt_init(imx7ulp_wdt, wdog->timeout * imx7ulp_wdt->hw->wdog_clock_rate); in imx7ulp_wdt_probe()
355 return devm_watchdog_register_device(dev, wdog); in imx7ulp_wdt_probe()