Lines Matching +full:panel +full:- +full:dpi
1 // SPDX-License-Identifier: GPL-2.0-only
3 * TFP410 DPI-to-DVI encoder driver
35 struct omap_dss_device *in = ddata->in; in tfp410_connect()
39 return -EBUSY; in tfp410_connect()
41 r = in->ops.dpi->connect(in, dssdev); in tfp410_connect()
45 dst->src = dssdev; in tfp410_connect()
46 dssdev->dst = dst; in tfp410_connect()
55 struct omap_dss_device *in = ddata->in; in tfp410_disconnect()
61 WARN_ON(dst != dssdev->dst); in tfp410_disconnect()
62 if (dst != dssdev->dst) in tfp410_disconnect()
65 dst->src = NULL; in tfp410_disconnect()
66 dssdev->dst = NULL; in tfp410_disconnect()
68 in->ops.dpi->disconnect(in, &ddata->dssdev); in tfp410_disconnect()
74 struct omap_dss_device *in = ddata->in; in tfp410_enable()
78 return -ENODEV; in tfp410_enable()
83 in->ops.dpi->set_timings(in, &ddata->timings); in tfp410_enable()
84 if (ddata->data_lines) in tfp410_enable()
85 in->ops.dpi->set_data_lines(in, ddata->data_lines); in tfp410_enable()
87 r = in->ops.dpi->enable(in); in tfp410_enable()
91 if (ddata->pd_gpio) in tfp410_enable()
92 gpiod_set_value_cansleep(ddata->pd_gpio, 0); in tfp410_enable()
94 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in tfp410_enable()
102 struct omap_dss_device *in = ddata->in; in tfp410_disable()
107 if (ddata->pd_gpio) in tfp410_disable()
108 gpiod_set_value_cansleep(ddata->pd_gpio, 1); in tfp410_disable()
110 in->ops.dpi->disable(in); in tfp410_disable()
112 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in tfp410_disable()
117 timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; in tfp410_fix_timings()
118 timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; in tfp410_fix_timings()
119 timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH; in tfp410_fix_timings()
126 struct omap_dss_device *in = ddata->in; in tfp410_set_timings()
130 ddata->timings = *timings; in tfp410_set_timings()
131 dssdev->panel.timings = *timings; in tfp410_set_timings()
133 in->ops.dpi->set_timings(in, timings); in tfp410_set_timings()
141 *timings = ddata->timings; in tfp410_get_timings()
148 struct omap_dss_device *in = ddata->in; in tfp410_check_timings()
152 return in->ops.dpi->check_timings(in, timings); in tfp410_check_timings()
173 if (!pdev->dev.of_node) in tfp410_probe()
174 return -ENODEV; in tfp410_probe()
176 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in tfp410_probe()
178 return -ENOMEM; in tfp410_probe()
182 ddata->pd_gpio = devm_gpiod_get_optional(&pdev->dev, "powerdown", in tfp410_probe()
184 r = PTR_ERR_OR_ZERO(ddata->pd_gpio); in tfp410_probe()
186 dev_err(&pdev->dev, "Failed to request PD GPIO: %d\n", r); in tfp410_probe()
190 gpiod_set_consumer_name(ddata->pd_gpio, "tfp410 PD"); in tfp410_probe()
192 ddata->in = omapdss_of_find_source_for_first_ep(pdev->dev.of_node); in tfp410_probe()
193 r = PTR_ERR_OR_ZERO(ddata->in); in tfp410_probe()
195 dev_err(&pdev->dev, "failed to find video source: %d\n", r); in tfp410_probe()
199 dssdev = &ddata->dssdev; in tfp410_probe()
200 dssdev->ops.dvi = &tfp410_dvi_ops; in tfp410_probe()
201 dssdev->dev = &pdev->dev; in tfp410_probe()
202 dssdev->type = OMAP_DISPLAY_TYPE_DPI; in tfp410_probe()
203 dssdev->output_type = OMAP_DISPLAY_TYPE_DVI; in tfp410_probe()
204 dssdev->owner = THIS_MODULE; in tfp410_probe()
205 dssdev->phy.dpi.data_lines = ddata->data_lines; in tfp410_probe()
206 dssdev->port_num = 1; in tfp410_probe()
210 dev_err(&pdev->dev, "Failed to register output\n"); in tfp410_probe()
216 omap_dss_put_device(ddata->in); in tfp410_probe()
223 struct omap_dss_device *dssdev = &ddata->dssdev; in tfp410_remove()
224 struct omap_dss_device *in = ddata->in; in tfp410_remove()
226 omapdss_unregister_output(&ddata->dssdev); in tfp410_remove()
234 tfp410_disconnect(dssdev, dssdev->dst); in tfp410_remove()
258 MODULE_DESCRIPTION("TFP410 DPI to DVI encoder driver");