Lines Matching +full:dvi +full:- +full:connector

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generic DVI Connector driver
53 struct omap_dss_device *in = ddata->in; in dvic_connect()
58 return in->ops.dvi->connect(in, dssdev); in dvic_connect()
64 struct omap_dss_device *in = ddata->in; in dvic_disconnect()
69 in->ops.dvi->disconnect(in, dssdev); in dvic_disconnect()
75 struct omap_dss_device *in = ddata->in; in dvic_enable()
79 return -ENODEV; in dvic_enable()
84 in->ops.dvi->set_timings(in, &ddata->timings); in dvic_enable()
86 r = in->ops.dvi->enable(in); in dvic_enable()
90 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in dvic_enable()
98 struct omap_dss_device *in = ddata->in; in dvic_disable()
103 in->ops.dvi->disable(in); in dvic_disable()
105 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in dvic_disable()
112 struct omap_dss_device *in = ddata->in; in dvic_set_timings()
114 ddata->timings = *timings; in dvic_set_timings()
115 dssdev->panel.timings = *timings; in dvic_set_timings()
117 in->ops.dvi->set_timings(in, timings); in dvic_set_timings()
125 *timings = ddata->timings; in dvic_get_timings()
132 struct omap_dss_device *in = ddata->in; in dvic_check_timings()
134 return in->ops.dvi->check_timings(in, timings); in dvic_check_timings()
142 for (retries = 3; retries > 0; retries--) { in dvic_ddc_read()
161 if (r != -EAGAIN) in dvic_ddc_read()
165 return r < 0 ? r : -EIO; in dvic_ddc_read()
174 if (!ddata->i2c_adapter) in dvic_read_edid()
175 return -ENODEV; in dvic_read_edid()
178 r = dvic_ddc_read(ddata->i2c_adapter, edid, l, 0); in dvic_read_edid()
186 l = min(EDID_LENGTH, len - EDID_LENGTH); in dvic_read_edid()
188 r = dvic_ddc_read(ddata->i2c_adapter, edid + EDID_LENGTH, in dvic_read_edid()
205 if (!ddata->i2c_adapter) in dvic_detect()
208 r = dvic_ddc_read(ddata->i2c_adapter, &out, 1, 0); in dvic_detect()
233 struct device_node *node = pdev->dev.of_node; in dvic_probe_of()
240 dev_err(&pdev->dev, "failed to find video source\n"); in dvic_probe_of()
244 ddata->in = in; in dvic_probe_of()
246 adapter_node = of_parse_phandle(node, "ddc-i2c-bus", 0); in dvic_probe_of()
251 dev_err(&pdev->dev, "failed to parse ddc-i2c-bus\n"); in dvic_probe_of()
252 omap_dss_put_device(ddata->in); in dvic_probe_of()
253 return -EPROBE_DEFER; in dvic_probe_of()
256 ddata->i2c_adapter = adapter; in dvic_probe_of()
268 if (!pdev->dev.of_node) in dvic_probe()
269 return -ENODEV; in dvic_probe()
271 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in dvic_probe()
273 return -ENOMEM; in dvic_probe()
281 ddata->timings = dvic_default_timings; in dvic_probe()
283 dssdev = &ddata->dssdev; in dvic_probe()
284 dssdev->driver = &dvic_driver; in dvic_probe()
285 dssdev->dev = &pdev->dev; in dvic_probe()
286 dssdev->type = OMAP_DISPLAY_TYPE_DVI; in dvic_probe()
287 dssdev->owner = THIS_MODULE; in dvic_probe()
288 dssdev->panel.timings = dvic_default_timings; in dvic_probe()
292 dev_err(&pdev->dev, "Failed to register panel\n"); in dvic_probe()
299 omap_dss_put_device(ddata->in); in dvic_probe()
301 i2c_put_adapter(ddata->i2c_adapter); in dvic_probe()
309 struct omap_dss_device *dssdev = &ddata->dssdev; in dvic_remove()
310 struct omap_dss_device *in = ddata->in; in dvic_remove()
312 omapdss_unregister_display(&ddata->dssdev); in dvic_remove()
319 i2c_put_adapter(ddata->i2c_adapter); in dvic_remove()
323 { .compatible = "omapdss,dvi-connector", },
333 .name = "connector-dvi",
341 MODULE_DESCRIPTION("Generic DVI Connector driver");