Lines Matching +full:panel +full:- +full:dpi
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * NEC NL8048HL11 Panel driver
106 for (i = 0; i < (ARRAY_SIZE(nec_8048_init_seq) - 1); i++) in init_nec_8048_wvga_lcd()
118 struct omap_dss_device *in = ddata->in; in nec_8048_connect()
123 return in->ops.dpi->connect(in, dssdev); in nec_8048_connect()
129 struct omap_dss_device *in = ddata->in; in nec_8048_disconnect()
134 in->ops.dpi->disconnect(in, dssdev); in nec_8048_disconnect()
140 struct omap_dss_device *in = ddata->in; in nec_8048_enable()
144 return -ENODEV; in nec_8048_enable()
149 if (ddata->data_lines) in nec_8048_enable()
150 in->ops.dpi->set_data_lines(in, ddata->data_lines); in nec_8048_enable()
151 in->ops.dpi->set_timings(in, &ddata->videomode); in nec_8048_enable()
153 r = in->ops.dpi->enable(in); in nec_8048_enable()
158 gpiod_set_value_cansleep(ddata->res_gpio, 1); in nec_8048_enable()
160 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in nec_8048_enable()
168 struct omap_dss_device *in = ddata->in; in nec_8048_disable()
174 gpiod_set_value_cansleep(ddata->res_gpio, 0); in nec_8048_disable()
176 in->ops.dpi->disable(in); in nec_8048_disable()
178 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in nec_8048_disable()
185 struct omap_dss_device *in = ddata->in; in nec_8048_set_timings()
187 ddata->videomode = *timings; in nec_8048_set_timings()
188 dssdev->panel.timings = *timings; in nec_8048_set_timings()
190 in->ops.dpi->set_timings(in, timings); in nec_8048_set_timings()
198 *timings = ddata->videomode; in nec_8048_get_timings()
205 struct omap_dss_device *in = ddata->in; in nec_8048_check_timings()
207 return in->ops.dpi->check_timings(in, timings); in nec_8048_check_timings()
230 dev_dbg(&spi->dev, "%s\n", __func__); in nec_8048_probe()
232 if (!spi->dev.of_node) in nec_8048_probe()
233 return -ENODEV; in nec_8048_probe()
235 spi->mode = SPI_MODE_0; in nec_8048_probe()
236 spi->bits_per_word = 32; in nec_8048_probe()
240 dev_err(&spi->dev, "spi_setup failed: %d\n", r); in nec_8048_probe()
246 ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL); in nec_8048_probe()
248 return -ENOMEM; in nec_8048_probe()
250 dev_set_drvdata(&spi->dev, ddata); in nec_8048_probe()
252 ddata->spi = spi; in nec_8048_probe()
254 ddata->in = omapdss_of_find_source_for_first_ep(spi->dev.of_node); in nec_8048_probe()
255 r = PTR_ERR_OR_ZERO(ddata->in); in nec_8048_probe()
257 dev_err(&spi->dev, "failed to find video source: %d\n", r); in nec_8048_probe()
261 ddata->res_gpio = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW); in nec_8048_probe()
262 r = PTR_ERR_OR_ZERO(ddata->res_gpio); in nec_8048_probe()
264 dev_err(&spi->dev, "failed to request reset gpio: %d\n", r); in nec_8048_probe()
268 gpiod_set_consumer_name(ddata->res_gpio, "lcd RES"); in nec_8048_probe()
270 ddata->videomode = nec_8048_panel_timings; in nec_8048_probe()
272 dssdev = &ddata->dssdev; in nec_8048_probe()
273 dssdev->dev = &spi->dev; in nec_8048_probe()
274 dssdev->driver = &nec_8048_ops; in nec_8048_probe()
275 dssdev->type = OMAP_DISPLAY_TYPE_DPI; in nec_8048_probe()
276 dssdev->owner = THIS_MODULE; in nec_8048_probe()
277 dssdev->panel.timings = ddata->videomode; in nec_8048_probe()
281 dev_err(&spi->dev, "Failed to register panel\n"); in nec_8048_probe()
289 omap_dss_put_device(ddata->in); in nec_8048_probe()
295 struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev); in nec_8048_remove()
296 struct omap_dss_device *dssdev = &ddata->dssdev; in nec_8048_remove()
297 struct omap_dss_device *in = ddata->in; in nec_8048_remove()
299 dev_dbg(&ddata->spi->dev, "%s\n", __func__); in nec_8048_remove()
324 /* reinitialize the panel */ in nec_8048_resume()
347 .name = "panel-nec-nl8048hl11",
360 MODULE_DESCRIPTION("NEC-NL8048HL11 Driver");