Lines Matching +full:panel +full:- +full:dpi

1 // SPDX-License-Identifier: GPL-2.0-only
3 * TFP410 DPI-to-DVI encoder driver
33 struct omap_dss_device *in = ddata->in; in tfp410_connect()
37 return -EBUSY; in tfp410_connect()
39 r = in->ops.dpi->connect(in, dssdev); in tfp410_connect()
43 dst->src = dssdev; in tfp410_connect()
44 dssdev->dst = dst; in tfp410_connect()
53 struct omap_dss_device *in = ddata->in; in tfp410_disconnect()
59 WARN_ON(dst != dssdev->dst); in tfp410_disconnect()
60 if (dst != dssdev->dst) in tfp410_disconnect()
63 dst->src = NULL; in tfp410_disconnect()
64 dssdev->dst = NULL; in tfp410_disconnect()
66 in->ops.dpi->disconnect(in, &ddata->dssdev); in tfp410_disconnect()
72 struct omap_dss_device *in = ddata->in; in tfp410_enable()
76 return -ENODEV; in tfp410_enable()
81 in->ops.dpi->set_timings(in, &ddata->timings); in tfp410_enable()
82 if (ddata->data_lines) in tfp410_enable()
83 in->ops.dpi->set_data_lines(in, ddata->data_lines); in tfp410_enable()
85 r = in->ops.dpi->enable(in); in tfp410_enable()
89 if (gpio_is_valid(ddata->pd_gpio)) in tfp410_enable()
90 gpio_set_value_cansleep(ddata->pd_gpio, 1); in tfp410_enable()
92 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in tfp410_enable()
100 struct omap_dss_device *in = ddata->in; in tfp410_disable()
105 if (gpio_is_valid(ddata->pd_gpio)) in tfp410_disable()
106 gpio_set_value_cansleep(ddata->pd_gpio, 0); in tfp410_disable()
108 in->ops.dpi->disable(in); in tfp410_disable()
110 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in tfp410_disable()
115 timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; in tfp410_fix_timings()
116 timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; in tfp410_fix_timings()
117 timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH; in tfp410_fix_timings()
124 struct omap_dss_device *in = ddata->in; in tfp410_set_timings()
128 ddata->timings = *timings; in tfp410_set_timings()
129 dssdev->panel.timings = *timings; in tfp410_set_timings()
131 in->ops.dpi->set_timings(in, timings); in tfp410_set_timings()
139 *timings = ddata->timings; in tfp410_get_timings()
146 struct omap_dss_device *in = ddata->in; in tfp410_check_timings()
150 return in->ops.dpi->check_timings(in, timings); in tfp410_check_timings()
168 struct device_node *node = pdev->dev.of_node; in tfp410_probe_of()
172 gpio = of_get_named_gpio(node, "powerdown-gpios", 0); in tfp410_probe_of()
174 if (gpio_is_valid(gpio) || gpio == -ENOENT) { in tfp410_probe_of()
175 ddata->pd_gpio = gpio; in tfp410_probe_of()
177 dev_err(&pdev->dev, "failed to parse PD gpio\n"); in tfp410_probe_of()
183 dev_err(&pdev->dev, "failed to find video source\n"); in tfp410_probe_of()
187 ddata->in = in; in tfp410_probe_of()
198 if (!pdev->dev.of_node) in tfp410_probe()
199 return -ENODEV; in tfp410_probe()
201 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in tfp410_probe()
203 return -ENOMEM; in tfp410_probe()
211 if (gpio_is_valid(ddata->pd_gpio)) { in tfp410_probe()
212 r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio, in tfp410_probe()
215 dev_err(&pdev->dev, "Failed to request PD GPIO %d\n", in tfp410_probe()
216 ddata->pd_gpio); in tfp410_probe()
221 dssdev = &ddata->dssdev; in tfp410_probe()
222 dssdev->ops.dvi = &tfp410_dvi_ops; in tfp410_probe()
223 dssdev->dev = &pdev->dev; in tfp410_probe()
224 dssdev->type = OMAP_DISPLAY_TYPE_DPI; in tfp410_probe()
225 dssdev->output_type = OMAP_DISPLAY_TYPE_DVI; in tfp410_probe()
226 dssdev->owner = THIS_MODULE; in tfp410_probe()
227 dssdev->phy.dpi.data_lines = ddata->data_lines; in tfp410_probe()
228 dssdev->port_num = 1; in tfp410_probe()
232 dev_err(&pdev->dev, "Failed to register output\n"); in tfp410_probe()
239 omap_dss_put_device(ddata->in); in tfp410_probe()
246 struct omap_dss_device *dssdev = &ddata->dssdev; in tfp410_remove()
247 struct omap_dss_device *in = ddata->in; in tfp410_remove()
249 omapdss_unregister_output(&ddata->dssdev); in tfp410_remove()
257 tfp410_disconnect(dssdev, dssdev->dst); in tfp410_remove()
284 MODULE_DESCRIPTION("TFP410 DPI to DVI encoder driver");