Lines Matching +full:iovcc +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0-only
11 * http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet
30 "iovcc"
57 struct mipi_dsi_device *dsi = jdi->dsi; in jdi_panel_init()
58 struct device *dev = &jdi->dsi->dev; in jdi_panel_init()
61 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in jdi_panel_init()
75 ret = mipi_dsi_dcs_set_column_address(dsi, 0, jdi->mode->hdisplay - 1); in jdi_panel_init()
81 ret = mipi_dsi_dcs_set_page_address(dsi, 0, jdi->mode->vdisplay - 1); in jdi_panel_init()
147 struct mipi_dsi_device *dsi = jdi->dsi; in jdi_panel_on()
148 struct device *dev = &jdi->dsi->dev; in jdi_panel_on()
151 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in jdi_panel_on()
162 struct mipi_dsi_device *dsi = jdi->dsi; in jdi_panel_off()
163 struct device *dev = &jdi->dsi->dev; in jdi_panel_off()
166 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in jdi_panel_off()
183 if (!jdi->enabled) in jdi_panel_disable()
186 backlight_disable(jdi->backlight); in jdi_panel_disable()
188 jdi->enabled = false; in jdi_panel_disable()
196 struct device *dev = &jdi->dsi->dev; in jdi_panel_unprepare()
199 if (!jdi->prepared) in jdi_panel_unprepare()
204 ret = regulator_bulk_disable(ARRAY_SIZE(jdi->supplies), jdi->supplies); in jdi_panel_unprepare()
208 gpiod_set_value(jdi->enable_gpio, 0); in jdi_panel_unprepare()
210 gpiod_set_value(jdi->reset_gpio, 1); in jdi_panel_unprepare()
212 gpiod_set_value(jdi->dcdc_en_gpio, 0); in jdi_panel_unprepare()
214 jdi->prepared = false; in jdi_panel_unprepare()
222 struct device *dev = &jdi->dsi->dev; in jdi_panel_prepare()
225 if (jdi->prepared) in jdi_panel_prepare()
228 ret = regulator_bulk_enable(ARRAY_SIZE(jdi->supplies), jdi->supplies); in jdi_panel_prepare()
236 gpiod_set_value(jdi->dcdc_en_gpio, 1); in jdi_panel_prepare()
239 gpiod_set_value(jdi->reset_gpio, 0); in jdi_panel_prepare()
242 gpiod_set_value(jdi->enable_gpio, 1); in jdi_panel_prepare()
257 jdi->prepared = true; in jdi_panel_prepare()
262 ret = regulator_bulk_disable(ARRAY_SIZE(jdi->supplies), jdi->supplies); in jdi_panel_prepare()
266 gpiod_set_value(jdi->enable_gpio, 0); in jdi_panel_prepare()
268 gpiod_set_value(jdi->reset_gpio, 1); in jdi_panel_prepare()
270 gpiod_set_value(jdi->dcdc_en_gpio, 0); in jdi_panel_prepare()
279 if (jdi->enabled) in jdi_panel_enable()
282 backlight_enable(jdi->backlight); in jdi_panel_enable()
284 jdi->enabled = true; in jdi_panel_enable()
307 struct device *dev = &jdi->dsi->dev; in jdi_panel_get_modes()
309 mode = drm_mode_duplicate(connector->dev, &default_mode); in jdi_panel_get_modes()
314 return -ENOMEM; in jdi_panel_get_modes()
321 connector->display_info.width_mm = 95; in jdi_panel_get_modes()
322 connector->display_info.height_mm = 151; in jdi_panel_get_modes()
331 u16 brightness = bl->props.brightness; in dsi_dcs_bl_get_brightness()
333 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in dsi_dcs_bl_get_brightness()
339 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in dsi_dcs_bl_get_brightness()
349 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in dsi_dcs_bl_update_status()
351 ret = mipi_dsi_dcs_set_display_brightness(dsi, bl->props.brightness); in dsi_dcs_bl_update_status()
355 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in dsi_dcs_bl_update_status()
368 struct device *dev = &dsi->dev; in drm_panel_create_dsi_backlight()
396 struct device *dev = &jdi->dsi->dev; in jdi_panel_add()
400 jdi->mode = &default_mode; in jdi_panel_add()
402 for (i = 0; i < ARRAY_SIZE(jdi->supplies); i++) in jdi_panel_add()
403 jdi->supplies[i].supply = regulator_names[i]; in jdi_panel_add()
405 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(jdi->supplies), in jdi_panel_add()
406 jdi->supplies); in jdi_panel_add()
412 jdi->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in jdi_panel_add()
413 if (IS_ERR(jdi->enable_gpio)) { in jdi_panel_add()
414 ret = PTR_ERR(jdi->enable_gpio); in jdi_panel_add()
415 dev_err(dev, "cannot get enable-gpio %d\n", ret); in jdi_panel_add()
419 jdi->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in jdi_panel_add()
420 if (IS_ERR(jdi->reset_gpio)) { in jdi_panel_add()
421 ret = PTR_ERR(jdi->reset_gpio); in jdi_panel_add()
422 dev_err(dev, "cannot get reset-gpios %d\n", ret); in jdi_panel_add()
426 jdi->dcdc_en_gpio = devm_gpiod_get(dev, "dcdc-en", GPIOD_OUT_LOW); in jdi_panel_add()
427 if (IS_ERR(jdi->dcdc_en_gpio)) { in jdi_panel_add()
428 ret = PTR_ERR(jdi->dcdc_en_gpio); in jdi_panel_add()
429 dev_err(dev, "cannot get dcdc-en-gpio %d\n", ret); in jdi_panel_add()
433 jdi->backlight = drm_panel_create_dsi_backlight(jdi->dsi); in jdi_panel_add()
434 if (IS_ERR(jdi->backlight)) { in jdi_panel_add()
435 ret = PTR_ERR(jdi->backlight); in jdi_panel_add()
440 drm_panel_init(&jdi->base, &jdi->dsi->dev, &jdi_panel_funcs, in jdi_panel_add()
443 drm_panel_add(&jdi->base); in jdi_panel_add()
450 if (jdi->base.dev) in jdi_panel_del()
451 drm_panel_remove(&jdi->base); in jdi_panel_del()
459 dsi->lanes = 4; in jdi_panel_probe()
460 dsi->format = MIPI_DSI_FMT_RGB888; in jdi_panel_probe()
461 dsi->mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | in jdi_panel_probe()
464 jdi = devm_kzalloc(&dsi->dev, sizeof(*jdi), GFP_KERNEL); in jdi_panel_probe()
466 return -ENOMEM; in jdi_panel_probe()
470 jdi->dsi = dsi; in jdi_panel_probe()
484 ret = jdi_panel_disable(&jdi->base); in jdi_panel_remove()
486 dev_err(&dsi->dev, "failed to disable panel: %d\n", ret); in jdi_panel_remove()
490 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", in jdi_panel_remove()
502 jdi_panel_disable(&jdi->base); in jdi_panel_shutdown()
507 .name = "panel-jdi-lt070me05000",