Lines Matching refs:imx8qm_ldb

47 struct imx8qm_ldb {  struct
62 static inline struct imx8qm_ldb *base_to_imx8qm_ldb(struct ldb *base) in base_to_imx8qm_ldb() argument
64 return container_of(base, struct imx8qm_ldb, base); in base_to_imx8qm_ldb()
67 static void imx8qm_ldb_set_phy_cfg(struct imx8qm_ldb *imx8qm_ldb, in imx8qm_ldb_set_phy_cfg() argument
87 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_atomic_check() local
100 imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, false, phy_cfg); in imx8qm_ldb_bridge_atomic_check()
103 DRM_DEV_DEBUG_DRIVER(imx8qm_ldb->dev, in imx8qm_ldb_bridge_atomic_check()
110 &imx8qm_ldb->channel[imx8qm_ldb->active_chno ^ 1]; in imx8qm_ldb_bridge_atomic_check()
111 imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, true, in imx8qm_ldb_bridge_atomic_check()
115 DRM_DEV_DEBUG_DRIVER(imx8qm_ldb->dev, in imx8qm_ldb_bridge_atomic_check()
134 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_mode_set() local
135 struct device *dev = imx8qm_ldb->dev; in imx8qm_ldb_bridge_mode_set()
151 clk_set_rate(imx8qm_ldb->clk_bypass, di_clk); in imx8qm_ldb_bridge_mode_set()
152 clk_set_rate(imx8qm_ldb->clk_pixel, di_clk); in imx8qm_ldb_bridge_mode_set()
154 imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, false, phy_cfg); in imx8qm_ldb_bridge_mode_set()
161 &imx8qm_ldb->channel[imx8qm_ldb->active_chno ^ 1]; in imx8qm_ldb_bridge_mode_set()
162 imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, true, in imx8qm_ldb_bridge_mode_set()
211 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_atomic_enable() local
212 struct device *dev = imx8qm_ldb->dev; in imx8qm_ldb_bridge_atomic_enable()
216 clk_prepare_enable(imx8qm_ldb->clk_pixel); in imx8qm_ldb_bridge_atomic_enable()
217 clk_prepare_enable(imx8qm_ldb->clk_bypass); in imx8qm_ldb_bridge_atomic_enable()
230 ret = phy_power_on(imx8qm_ldb->channel[0].phy); in imx8qm_ldb_bridge_atomic_enable()
236 ret = phy_power_on(imx8qm_ldb->channel[1].phy); in imx8qm_ldb_bridge_atomic_enable()
258 struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); in imx8qm_ldb_bridge_atomic_disable() local
259 struct device *dev = imx8qm_ldb->dev; in imx8qm_ldb_bridge_atomic_disable()
266 ret = phy_power_off(imx8qm_ldb->channel[0].phy); in imx8qm_ldb_bridge_atomic_disable()
271 ret = phy_power_off(imx8qm_ldb->channel[1].phy); in imx8qm_ldb_bridge_atomic_disable()
282 clk_disable_unprepare(imx8qm_ldb->clk_bypass); in imx8qm_ldb_bridge_atomic_disable()
283 clk_disable_unprepare(imx8qm_ldb->clk_pixel); in imx8qm_ldb_bridge_atomic_disable()
409 static int imx8qm_ldb_get_phy(struct imx8qm_ldb *imx8qm_ldb) in imx8qm_ldb_get_phy() argument
413 struct device *dev = imx8qm_ldb->dev; in imx8qm_ldb_get_phy()
417 imx8qm_ldb_ch = &imx8qm_ldb->channel[i]; in imx8qm_ldb_get_phy()
441 struct imx8qm_ldb *imx8qm_ldb; in imx8qm_ldb_probe() local
449 imx8qm_ldb = devm_kzalloc(dev, sizeof(*imx8qm_ldb), GFP_KERNEL); in imx8qm_ldb_probe()
450 if (!imx8qm_ldb) in imx8qm_ldb_probe()
453 imx8qm_ldb->clk_pixel = devm_clk_get(dev, "pixel"); in imx8qm_ldb_probe()
454 if (IS_ERR(imx8qm_ldb->clk_pixel)) { in imx8qm_ldb_probe()
455 ret = PTR_ERR(imx8qm_ldb->clk_pixel); in imx8qm_ldb_probe()
462 imx8qm_ldb->clk_bypass = devm_clk_get(dev, "bypass"); in imx8qm_ldb_probe()
463 if (IS_ERR(imx8qm_ldb->clk_bypass)) { in imx8qm_ldb_probe()
464 ret = PTR_ERR(imx8qm_ldb->clk_bypass); in imx8qm_ldb_probe()
471 imx8qm_ldb->dev = dev; in imx8qm_ldb_probe()
473 ldb = &imx8qm_ldb->base; in imx8qm_ldb_probe()
478 ldb->channel[i] = &imx8qm_ldb->channel[i].base; in imx8qm_ldb_probe()
503 imx8qm_ldb->active_chno = 0; in imx8qm_ldb_probe()
504 imx8qm_ldb_ch = &imx8qm_ldb->channel[0]; in imx8qm_ldb_probe()
509 imx8qm_ldb_ch = &imx8qm_ldb->channel[i]; in imx8qm_ldb_probe()
513 imx8qm_ldb->active_chno = ldb_ch->chno; in imx8qm_ldb_probe()
519 ret = imx8qm_ldb_get_phy(imx8qm_ldb); in imx8qm_ldb_probe()
527 platform_set_drvdata(pdev, imx8qm_ldb); in imx8qm_ldb_probe()
537 struct imx8qm_ldb *imx8qm_ldb = platform_get_drvdata(pdev); in imx8qm_ldb_remove() local
538 struct ldb *ldb = &imx8qm_ldb->base; in imx8qm_ldb_remove()
552 struct imx8qm_ldb *imx8qm_ldb = dev_get_drvdata(dev); in imx8qm_ldb_runtime_resume() local
553 struct ldb *ldb = &imx8qm_ldb->base; in imx8qm_ldb_runtime_resume()