Lines Matching +full:panel +full:- +full:timing
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generic MIPI DPI Panel Driver
34 struct omap_dss_device *in = ddata->in; in panel_dpi_connect()
39 return in->ops.dpi->connect(in, dssdev); in panel_dpi_connect()
45 struct omap_dss_device *in = ddata->in; in panel_dpi_disconnect()
50 in->ops.dpi->disconnect(in, dssdev); in panel_dpi_disconnect()
56 struct omap_dss_device *in = ddata->in; in panel_dpi_enable()
60 return -ENODEV; in panel_dpi_enable()
65 if (ddata->data_lines) in panel_dpi_enable()
66 in->ops.dpi->set_data_lines(in, ddata->data_lines); in panel_dpi_enable()
67 in->ops.dpi->set_timings(in, &ddata->videomode); in panel_dpi_enable()
69 r = in->ops.dpi->enable(in); in panel_dpi_enable()
73 gpiod_set_value_cansleep(ddata->enable_gpio, 1); in panel_dpi_enable()
75 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in panel_dpi_enable()
83 struct omap_dss_device *in = ddata->in; in panel_dpi_disable()
88 gpiod_set_value_cansleep(ddata->enable_gpio, 0); in panel_dpi_disable()
90 in->ops.dpi->disable(in); in panel_dpi_disable()
92 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in panel_dpi_disable()
99 struct omap_dss_device *in = ddata->in; in panel_dpi_set_timings()
101 ddata->videomode = *timings; in panel_dpi_set_timings()
102 dssdev->panel.timings = *timings; in panel_dpi_set_timings()
104 in->ops.dpi->set_timings(in, timings); in panel_dpi_set_timings()
112 *timings = ddata->videomode; in panel_dpi_get_timings()
119 struct omap_dss_device *in = ddata->in; in panel_dpi_check_timings()
121 return in->ops.dpi->check_timings(in, timings); in panel_dpi_check_timings()
141 struct device_node *node = pdev->dev.of_node; in panel_dpi_probe_of()
144 struct display_timing timing; in panel_dpi_probe_of() local
148 gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW); in panel_dpi_probe_of()
152 ddata->enable_gpio = gpio; in panel_dpi_probe_of()
154 r = of_get_display_timing(node, "panel-timing", &timing); in panel_dpi_probe_of()
156 dev_err(&pdev->dev, "failed to get video timing\n"); in panel_dpi_probe_of()
160 videomode_from_timing(&timing, &vm); in panel_dpi_probe_of()
161 videomode_to_omap_video_timings(&vm, &ddata->videomode); in panel_dpi_probe_of()
165 dev_err(&pdev->dev, "failed to find video source\n"); in panel_dpi_probe_of()
169 ddata->in = in; in panel_dpi_probe_of()
180 if (!pdev->dev.of_node) in panel_dpi_probe()
181 return -ENODEV; in panel_dpi_probe()
183 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in panel_dpi_probe()
185 return -ENOMEM; in panel_dpi_probe()
193 dssdev = &ddata->dssdev; in panel_dpi_probe()
194 dssdev->dev = &pdev->dev; in panel_dpi_probe()
195 dssdev->driver = &panel_dpi_ops; in panel_dpi_probe()
196 dssdev->type = OMAP_DISPLAY_TYPE_DPI; in panel_dpi_probe()
197 dssdev->owner = THIS_MODULE; in panel_dpi_probe()
198 dssdev->panel.timings = ddata->videomode; in panel_dpi_probe()
199 dssdev->phy.dpi.data_lines = ddata->data_lines; in panel_dpi_probe()
203 dev_err(&pdev->dev, "Failed to register panel\n"); in panel_dpi_probe()
210 omap_dss_put_device(ddata->in); in panel_dpi_probe()
217 struct omap_dss_device *dssdev = &ddata->dssdev; in panel_dpi_remove()
218 struct omap_dss_device *in = ddata->in; in panel_dpi_remove()
229 { .compatible = "omapdss,panel-dpi", },
239 .name = "panel-dpi",
247 MODULE_DESCRIPTION("Generic MIPI DPI Panel Driver");