Lines Matching refs:fsl_dev

55 	struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;  in fsl_dcu_irq_reset()  local
57 regmap_write(fsl_dev->regmap, DCU_INT_STATUS, ~0); in fsl_dcu_irq_reset()
58 regmap_write(fsl_dev->regmap, DCU_INT_MASK, ~0); in fsl_dcu_irq_reset()
64 struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; in fsl_dcu_drm_irq() local
68 ret = regmap_read(fsl_dev->regmap, DCU_INT_STATUS, &int_status); in fsl_dcu_drm_irq()
77 regmap_write(fsl_dev->regmap, DCU_INT_STATUS, int_status); in fsl_dcu_drm_irq()
94 struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; in fsl_dcu_irq_uninstall() local
97 free_irq(fsl_dev->irq, dev); in fsl_dcu_irq_uninstall()
102 struct fsl_dcu_drm_device *fsl_dev = dev->dev_private; in fsl_dcu_load() local
105 ret = fsl_dcu_drm_modeset_init(fsl_dev); in fsl_dcu_load()
117 ret = fsl_dcu_irq_install(dev, fsl_dev->irq); in fsl_dcu_load()
170 struct fsl_dcu_drm_device *fsl_dev = dev_get_drvdata(dev); in fsl_dcu_drm_pm_suspend() local
173 if (!fsl_dev) in fsl_dcu_drm_pm_suspend()
176 disable_irq(fsl_dev->irq); in fsl_dcu_drm_pm_suspend()
178 ret = drm_mode_config_helper_suspend(fsl_dev->drm); in fsl_dcu_drm_pm_suspend()
180 enable_irq(fsl_dev->irq); in fsl_dcu_drm_pm_suspend()
184 clk_disable_unprepare(fsl_dev->clk); in fsl_dcu_drm_pm_suspend()
191 struct fsl_dcu_drm_device *fsl_dev = dev_get_drvdata(dev); in fsl_dcu_drm_pm_resume() local
194 if (!fsl_dev) in fsl_dcu_drm_pm_resume()
197 ret = clk_prepare_enable(fsl_dev->clk); in fsl_dcu_drm_pm_resume()
203 if (fsl_dev->tcon) in fsl_dcu_drm_pm_resume()
204 fsl_tcon_bypass_enable(fsl_dev->tcon); in fsl_dcu_drm_pm_resume()
205 fsl_dcu_drm_init_planes(fsl_dev->drm); in fsl_dcu_drm_pm_resume()
206 enable_irq(fsl_dev->irq); in fsl_dcu_drm_pm_resume()
208 drm_mode_config_helper_resume(fsl_dev->drm); in fsl_dcu_drm_pm_resume()
246 struct fsl_dcu_drm_device *fsl_dev; in fsl_dcu_drm_probe() local
258 fsl_dev = devm_kzalloc(dev, sizeof(*fsl_dev), GFP_KERNEL); in fsl_dcu_drm_probe()
259 if (!fsl_dev) in fsl_dcu_drm_probe()
265 fsl_dev->soc = id->data; in fsl_dcu_drm_probe()
274 fsl_dev->irq = platform_get_irq(pdev, 0); in fsl_dcu_drm_probe()
275 if (fsl_dev->irq < 0) { in fsl_dcu_drm_probe()
277 return fsl_dev->irq; in fsl_dcu_drm_probe()
280 fsl_dev->regmap = devm_regmap_init_mmio(dev, base, in fsl_dcu_drm_probe()
282 if (IS_ERR(fsl_dev->regmap)) { in fsl_dcu_drm_probe()
284 return PTR_ERR(fsl_dev->regmap); in fsl_dcu_drm_probe()
287 fsl_dev->clk = devm_clk_get(dev, "dcu"); in fsl_dcu_drm_probe()
288 if (IS_ERR(fsl_dev->clk)) { in fsl_dcu_drm_probe()
290 return PTR_ERR(fsl_dev->clk); in fsl_dcu_drm_probe()
292 ret = clk_prepare_enable(fsl_dev->clk); in fsl_dcu_drm_probe()
301 pix_clk_in = fsl_dev->clk; in fsl_dcu_drm_probe()
309 fsl_dev->pix_clk = clk_register_divider(dev, pix_clk_name, in fsl_dcu_drm_probe()
312 if (IS_ERR(fsl_dev->pix_clk)) { in fsl_dcu_drm_probe()
314 ret = PTR_ERR(fsl_dev->pix_clk); in fsl_dcu_drm_probe()
318 fsl_dev->tcon = fsl_tcon_init(dev); in fsl_dcu_drm_probe()
326 fsl_dev->dev = dev; in fsl_dcu_drm_probe()
327 fsl_dev->drm = drm; in fsl_dcu_drm_probe()
328 fsl_dev->np = dev->of_node; in fsl_dcu_drm_probe()
329 drm->dev_private = fsl_dev; in fsl_dcu_drm_probe()
330 dev_set_drvdata(dev, fsl_dev); in fsl_dcu_drm_probe()
343 clk_unregister(fsl_dev->pix_clk); in fsl_dcu_drm_probe()
345 clk_disable_unprepare(fsl_dev->clk); in fsl_dcu_drm_probe()
351 struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev); in fsl_dcu_drm_remove() local
353 drm_dev_unregister(fsl_dev->drm); in fsl_dcu_drm_remove()
354 drm_dev_put(fsl_dev->drm); in fsl_dcu_drm_remove()
355 clk_disable_unprepare(fsl_dev->clk); in fsl_dcu_drm_remove()
356 clk_unregister(fsl_dev->pix_clk); in fsl_dcu_drm_remove()
361 struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev); in fsl_dcu_drm_shutdown() local
363 drm_atomic_helper_shutdown(fsl_dev->drm); in fsl_dcu_drm_shutdown()