Lines Matching +full:panel +full:- +full:dpi
1 // SPDX-License-Identifier: GPL-2.0-only
3 * LCD panel driver for Sharp LS037V7DW01
60 struct omap_dss_device *in = ddata->in; in sharp_ls_connect()
65 return in->ops.dpi->connect(in, dssdev); in sharp_ls_connect()
71 struct omap_dss_device *in = ddata->in; in sharp_ls_disconnect()
76 in->ops.dpi->disconnect(in, dssdev); in sharp_ls_disconnect()
82 struct omap_dss_device *in = ddata->in; in sharp_ls_enable()
86 return -ENODEV; in sharp_ls_enable()
91 if (ddata->data_lines) in sharp_ls_enable()
92 in->ops.dpi->set_data_lines(in, ddata->data_lines); in sharp_ls_enable()
93 in->ops.dpi->set_timings(in, &ddata->videomode); in sharp_ls_enable()
95 if (ddata->vcc) { in sharp_ls_enable()
96 r = regulator_enable(ddata->vcc); in sharp_ls_enable()
101 r = in->ops.dpi->enable(in); in sharp_ls_enable()
103 regulator_disable(ddata->vcc); in sharp_ls_enable()
110 if (ddata->resb_gpio) in sharp_ls_enable()
111 gpiod_set_value_cansleep(ddata->resb_gpio, 1); in sharp_ls_enable()
113 if (ddata->ini_gpio) in sharp_ls_enable()
114 gpiod_set_value_cansleep(ddata->ini_gpio, 1); in sharp_ls_enable()
116 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in sharp_ls_enable()
124 struct omap_dss_device *in = ddata->in; in sharp_ls_disable()
129 if (ddata->ini_gpio) in sharp_ls_disable()
130 gpiod_set_value_cansleep(ddata->ini_gpio, 0); in sharp_ls_disable()
132 if (ddata->resb_gpio) in sharp_ls_disable()
133 gpiod_set_value_cansleep(ddata->resb_gpio, 0); in sharp_ls_disable()
139 in->ops.dpi->disable(in); in sharp_ls_disable()
141 if (ddata->vcc) in sharp_ls_disable()
142 regulator_disable(ddata->vcc); in sharp_ls_disable()
144 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in sharp_ls_disable()
151 struct omap_dss_device *in = ddata->in; in sharp_ls_set_timings()
153 ddata->videomode = *timings; in sharp_ls_set_timings()
154 dssdev->panel.timings = *timings; in sharp_ls_set_timings()
156 in->ops.dpi->set_timings(in, timings); in sharp_ls_set_timings()
164 *timings = ddata->videomode; in sharp_ls_get_timings()
171 struct omap_dss_device *in = ddata->in; in sharp_ls_check_timings()
173 return in->ops.dpi->check_timings(in, timings); in sharp_ls_check_timings()
208 struct device_node *node = pdev->dev.of_node; in sharp_ls_probe_of()
212 ddata->vcc = devm_regulator_get(&pdev->dev, "envdd"); in sharp_ls_probe_of()
213 if (IS_ERR(ddata->vcc)) in sharp_ls_probe_of()
214 return dev_err_probe(&pdev->dev, PTR_ERR(ddata->vcc), in sharp_ls_probe_of()
218 r = sharp_ls_get_gpio_of(&pdev->dev, 0, 0, "enable", &ddata->ini_gpio); in sharp_ls_probe_of()
223 r = sharp_ls_get_gpio_of(&pdev->dev, 0, 0, "reset", &ddata->resb_gpio); in sharp_ls_probe_of()
228 r = sharp_ls_get_gpio_of(&pdev->dev, 0, 0, "mode", &ddata->mo_gpio); in sharp_ls_probe_of()
233 r = sharp_ls_get_gpio_of(&pdev->dev, 1, 1, "mode", &ddata->lr_gpio); in sharp_ls_probe_of()
238 r = sharp_ls_get_gpio_of(&pdev->dev, 2, 1, "mode", &ddata->ud_gpio); in sharp_ls_probe_of()
244 dev_err(&pdev->dev, "failed to find video source\n"); in sharp_ls_probe_of()
248 ddata->in = in; in sharp_ls_probe_of()
259 if (!pdev->dev.of_node) in sharp_ls_probe()
260 return -ENODEV; in sharp_ls_probe()
262 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in sharp_ls_probe()
264 return -ENOMEM; in sharp_ls_probe()
272 ddata->videomode = sharp_ls_timings; in sharp_ls_probe()
274 dssdev = &ddata->dssdev; in sharp_ls_probe()
275 dssdev->dev = &pdev->dev; in sharp_ls_probe()
276 dssdev->driver = &sharp_ls_ops; in sharp_ls_probe()
277 dssdev->type = OMAP_DISPLAY_TYPE_DPI; in sharp_ls_probe()
278 dssdev->owner = THIS_MODULE; in sharp_ls_probe()
279 dssdev->panel.timings = ddata->videomode; in sharp_ls_probe()
280 dssdev->phy.dpi.data_lines = ddata->data_lines; in sharp_ls_probe()
284 dev_err(&pdev->dev, "Failed to register panel\n"); in sharp_ls_probe()
291 omap_dss_put_device(ddata->in); in sharp_ls_probe()
298 struct omap_dss_device *dssdev = &ddata->dssdev; in sharp_ls_remove()
299 struct omap_dss_device *in = ddata->in; in sharp_ls_remove()
320 .name = "panel-sharp-ls037v7dw01",
328 MODULE_DESCRIPTION("Sharp LS037V7DW01 Panel Driver");