Lines Matching refs:imx7ulp_wdt

303 	struct imx7ulp_wdt_device *imx7ulp_wdt;  in imx7ulp_wdt_probe()  local
308 imx7ulp_wdt = devm_kzalloc(dev, sizeof(*imx7ulp_wdt), GFP_KERNEL); in imx7ulp_wdt_probe()
309 if (!imx7ulp_wdt) in imx7ulp_wdt_probe()
312 platform_set_drvdata(pdev, imx7ulp_wdt); in imx7ulp_wdt_probe()
314 imx7ulp_wdt->base = devm_platform_ioremap_resource(pdev, 0); in imx7ulp_wdt_probe()
315 if (IS_ERR(imx7ulp_wdt->base)) in imx7ulp_wdt_probe()
316 return PTR_ERR(imx7ulp_wdt->base); in imx7ulp_wdt_probe()
318 imx7ulp_wdt->clk = devm_clk_get_enabled(dev, NULL); in imx7ulp_wdt_probe()
319 if (IS_ERR(imx7ulp_wdt->clk)) { in imx7ulp_wdt_probe()
321 return PTR_ERR(imx7ulp_wdt->clk); in imx7ulp_wdt_probe()
324 imx7ulp_wdt->post_rcs_wait = true; in imx7ulp_wdt_probe()
328 imx7ulp_wdt->post_rcs_wait = false; in imx7ulp_wdt_probe()
333 wdog = &imx7ulp_wdt->wdd; in imx7ulp_wdt_probe()
344 watchdog_set_drvdata(wdog, imx7ulp_wdt); in imx7ulp_wdt_probe()
346 imx7ulp_wdt->hw = of_device_get_match_data(dev); in imx7ulp_wdt_probe()
347 ret = imx7ulp_wdt_init(imx7ulp_wdt, wdog->timeout * imx7ulp_wdt->hw->wdog_clock_rate); in imx7ulp_wdt_probe()
356 struct imx7ulp_wdt_device *imx7ulp_wdt = dev_get_drvdata(dev); in imx7ulp_wdt_suspend_noirq() local
358 if (watchdog_active(&imx7ulp_wdt->wdd)) in imx7ulp_wdt_suspend_noirq()
359 imx7ulp_wdt_stop(&imx7ulp_wdt->wdd); in imx7ulp_wdt_suspend_noirq()
361 clk_disable_unprepare(imx7ulp_wdt->clk); in imx7ulp_wdt_suspend_noirq()
368 struct imx7ulp_wdt_device *imx7ulp_wdt = dev_get_drvdata(dev); in imx7ulp_wdt_resume_noirq() local
369 u32 timeout = imx7ulp_wdt->wdd.timeout * imx7ulp_wdt->hw->wdog_clock_rate; in imx7ulp_wdt_resume_noirq()
372 ret = clk_prepare_enable(imx7ulp_wdt->clk); in imx7ulp_wdt_resume_noirq()
376 if (watchdog_active(&imx7ulp_wdt->wdd)) { in imx7ulp_wdt_resume_noirq()
377 imx7ulp_wdt_init(imx7ulp_wdt, timeout); in imx7ulp_wdt_resume_noirq()
378 imx7ulp_wdt_start(&imx7ulp_wdt->wdd); in imx7ulp_wdt_resume_noirq()
379 imx7ulp_wdt_ping(&imx7ulp_wdt->wdd); in imx7ulp_wdt_resume_noirq()