Lines Matching +full:clk +full:- +full:mgr

1 // SPDX-License-Identifier: GPL-2.0-only
15 #include <linux/clk.h>
250 struct clk *tv_dac_clk;
274 venc_write_reg(VENC_LLEN, config->llen); in venc_write_config()
275 venc_write_reg(VENC_FLENS, config->flens); in venc_write_config()
276 venc_write_reg(VENC_CC_CARR_WSS_CARR, config->cc_carr_wss_carr); in venc_write_config()
277 venc_write_reg(VENC_C_PHASE, config->c_phase); in venc_write_config()
278 venc_write_reg(VENC_GAIN_U, config->gain_u); in venc_write_config()
279 venc_write_reg(VENC_GAIN_V, config->gain_v); in venc_write_config()
280 venc_write_reg(VENC_GAIN_Y, config->gain_y); in venc_write_config()
281 venc_write_reg(VENC_BLACK_LEVEL, config->black_level); in venc_write_config()
282 venc_write_reg(VENC_BLANK_LEVEL, config->blank_level); in venc_write_config()
283 venc_write_reg(VENC_M_CONTROL, config->m_control); in venc_write_config()
284 venc_write_reg(VENC_BSTAMP_WSS_DATA, config->bstamp_wss_data | in venc_write_config()
286 venc_write_reg(VENC_S_CARR, config->s_carr); in venc_write_config()
287 venc_write_reg(VENC_L21__WC_CTL, config->l21__wc_ctl); in venc_write_config()
288 venc_write_reg(VENC_SAVID__EAVID, config->savid__eavid); in venc_write_config()
289 venc_write_reg(VENC_FLEN__FAL, config->flen__fal); in venc_write_config()
290 venc_write_reg(VENC_LAL__PHASE_RESET, config->lal__phase_reset); in venc_write_config()
291 venc_write_reg(VENC_HS_INT_START_STOP_X, config->hs_int_start_stop_x); in venc_write_config()
292 venc_write_reg(VENC_HS_EXT_START_STOP_X, config->hs_ext_start_stop_x); in venc_write_config()
293 venc_write_reg(VENC_VS_INT_START_X, config->vs_int_start_x); in venc_write_config()
295 config->vs_int_stop_x__vs_int_start_y); in venc_write_config()
297 config->vs_int_stop_y__vs_ext_start_x); in venc_write_config()
299 config->vs_ext_stop_x__vs_ext_start_y); in venc_write_config()
300 venc_write_reg(VENC_VS_EXT_STOP_Y, config->vs_ext_stop_y); in venc_write_config()
301 venc_write_reg(VENC_AVID_START_STOP_X, config->avid_start_stop_x); in venc_write_config()
302 venc_write_reg(VENC_AVID_START_STOP_Y, config->avid_start_stop_y); in venc_write_config()
304 config->fid_int_start_x__fid_int_start_y); in venc_write_config()
306 config->fid_int_offset_y__fid_ext_start_x); in venc_write_config()
308 config->fid_ext_start_y__fid_ext_offset_y); in venc_write_config()
311 venc_write_reg(VENC_VIDOUT_CTRL, config->vidout_ctrl); in venc_write_config()
312 venc_write_reg(VENC_HFLTR_CTRL, config->hfltr_ctrl); in venc_write_config()
313 venc_write_reg(VENC_X_COLOR, config->x_color); in venc_write_config()
314 venc_write_reg(VENC_LINE21, config->line21); in venc_write_config()
315 venc_write_reg(VENC_LN_SEL, config->ln_sel); in venc_write_config()
316 venc_write_reg(VENC_HTRIGGER_VTRIGGER, config->htrigger_vtrigger); in venc_write_config()
318 config->tvdetgp_int_start_stop_x); in venc_write_config()
320 config->tvdetgp_int_start_stop_y); in venc_write_config()
321 venc_write_reg(VENC_GEN_CTRL, config->gen_ctrl); in venc_write_config()
322 venc_write_reg(VENC_F_CONTROL, config->f_control); in venc_write_config()
323 venc_write_reg(VENC_SYNC_CTRL, config->sync_ctrl); in venc_write_config()
332 if (--t == 0) { in venc_reset()
351 r = pm_runtime_resume_and_get(&venc.pdev->dev); in venc_runtime_get()
363 r = pm_runtime_put_sync(&venc.pdev->dev); in venc_runtime_put()
364 WARN_ON(r < 0 && r != -ENOSYS); in venc_runtime_put()
382 struct omap_overlay_manager *mgr = venc.output.manager; in venc_power_on() local
400 else /* S-Video */ in venc_power_on()
408 dss_mgr_set_timings(mgr, &venc.timings); in venc_power_on()
414 r = dss_mgr_enable(mgr); in venc_power_on()
433 struct omap_overlay_manager *mgr = venc.output.manager; in venc_power_off() local
438 dss_mgr_disable(mgr); in venc_power_off()
454 if (out->manager == NULL) { in venc_display_enable()
456 r = -ENODEV; in venc_display_enable()
514 return -EINVAL; in venc_check_timings()
551 venc_write_reg(VENC_BSTAMP_WSS_DATA, config->bstamp_wss_data | in venc_set_wss()
589 if (venc.pdev->dev.of_node) in venc_init_regulator()
590 vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda"); in venc_init_regulator()
592 vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac"); in venc_init_regulator()
595 if (PTR_ERR(vdda_dac) != -EPROBE_DEFER) in venc_init_regulator()
607 #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r)) in venc_dump_regs()
661 struct clk *clk; in venc_get_clocks() local
664 clk = devm_clk_get(&pdev->dev, "tv_dac_clk"); in venc_get_clocks()
665 if (IS_ERR(clk)) { in venc_get_clocks()
667 return PTR_ERR(clk); in venc_get_clocks()
670 clk = NULL; in venc_get_clocks()
673 venc.tv_dac_clk = clk; in venc_get_clocks()
681 struct omap_overlay_manager *mgr; in venc_connect() local
688 mgr = omap_dss_get_overlay_manager(dssdev->dispc_channel); in venc_connect()
689 if (!mgr) in venc_connect()
690 return -ENODEV; in venc_connect()
692 r = dss_mgr_connect(mgr, dssdev); in venc_connect()
699 dst->name); in venc_connect()
700 dss_mgr_disconnect(mgr, dssdev); in venc_connect()
710 WARN_ON(dst != dssdev->dst); in venc_disconnect()
712 if (dst != dssdev->dst) in venc_disconnect()
717 if (dssdev->manager) in venc_disconnect()
718 dss_mgr_disconnect(dssdev->manager, dssdev); in venc_disconnect()
743 out->dev = &pdev->dev; in venc_init_output()
744 out->id = OMAP_DSS_OUTPUT_VENC; in venc_init_output()
745 out->output_type = OMAP_DISPLAY_TYPE_VENC; in venc_init_output()
746 out->name = "venc.0"; in venc_init_output()
747 out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT; in venc_init_output()
748 out->ops.atv = &venc_ops; in venc_init_output()
749 out->owner = THIS_MODULE; in venc_init_output()
763 struct device_node *node = pdev->dev.of_node; in venc_probe_of()
768 ep = of_graph_get_endpoint_by_regs(node, 0, -1); in venc_probe_of()
772 venc.invert_polarity = of_property_read_bool(ep, "ti,invert-polarity"); in venc_probe_of()
776 dev_err(&pdev->dev, in venc_probe_of()
789 dev_err(&pdev->dev, "bad channel property '%d'\n", channels); in venc_probe_of()
790 r = -EINVAL; in venc_probe_of()
820 return -EINVAL; in venc_bind()
823 venc.base = devm_ioremap(&pdev->dev, venc_mem->start, in venc_bind()
827 return -ENOMEM; in venc_bind()
834 pm_runtime_enable(&pdev->dev); in venc_bind()
841 dev_dbg(&pdev->dev, "OMAP VENC rev %d\n", rev_id); in venc_bind()
845 if (pdev->dev.of_node) { in venc_bind()
861 pm_runtime_disable(&pdev->dev); in venc_bind()
871 pm_runtime_disable(&pdev->dev); in venc_unbind()
881 return component_add(&pdev->dev, &venc_component_ops); in venc_probe()
886 component_del(&pdev->dev, &venc_component_ops); in venc_remove()
915 { .compatible = "ti,omap2-venc", },
916 { .compatible = "ti,omap3-venc", },
917 { .compatible = "ti,omap4-venc", },