Lines Matching +full:avee +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0-or-later
59 err = mipi_dsi_dcs_set_display_off(innolux->link); in innolux_panel_unprepare()
61 dev_err(panel->dev, "failed to set display off: %d\n", err); in innolux_panel_unprepare()
63 err = mipi_dsi_dcs_enter_sleep_mode(innolux->link); in innolux_panel_unprepare()
65 dev_err(panel->dev, "failed to enter sleep mode: %d\n", err); in innolux_panel_unprepare()
69 if (innolux->desc->sleep_mode_delay) in innolux_panel_unprepare()
70 msleep(innolux->desc->sleep_mode_delay); in innolux_panel_unprepare()
72 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_unprepare()
74 if (innolux->desc->power_down_delay) in innolux_panel_unprepare()
75 msleep(innolux->desc->power_down_delay); in innolux_panel_unprepare()
77 err = regulator_bulk_disable(innolux->desc->num_supplies, in innolux_panel_unprepare()
78 innolux->supplies); in innolux_panel_unprepare()
90 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_prepare()
92 err = regulator_bulk_enable(innolux->desc->num_supplies, in innolux_panel_prepare()
93 innolux->supplies); in innolux_panel_prepare()
100 gpiod_set_value_cansleep(innolux->enable_gpio, 1); in innolux_panel_prepare()
105 if (innolux->desc->init) { in innolux_panel_prepare()
106 err = innolux->desc->init(innolux); in innolux_panel_prepare()
111 err = mipi_dsi_dcs_exit_sleep_mode(innolux->link); in innolux_panel_prepare()
113 dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); in innolux_panel_prepare()
117 /* T6: 120ms - 1000ms*/ in innolux_panel_prepare()
120 err = mipi_dsi_dcs_set_display_on(innolux->link); in innolux_panel_prepare()
122 dev_err(panel->dev, "failed to set display on: %d\n", err); in innolux_panel_prepare()
132 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_prepare()
133 regulator_bulk_disable(innolux->desc->num_supplies, innolux->supplies); in innolux_panel_prepare()
167 .power_down_delay = 80, /* T8: 80ms - 1000ms */
172 "avee",
211 * https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/892065/
216 struct mipi_dsi_multi_context ctx = { .dsi = innolux->link }; in innolux_p097pfg_init()
340 const struct drm_display_mode *m = innolux->desc->mode; in innolux_panel_get_modes()
343 mode = drm_mode_duplicate(connector->dev, m); in innolux_panel_get_modes()
345 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in innolux_panel_get_modes()
346 m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); in innolux_panel_get_modes()
347 return -ENOMEM; in innolux_panel_get_modes()
354 connector->display_info.width_mm = innolux->desc->size.width; in innolux_panel_get_modes()
355 connector->display_info.height_mm = innolux->desc->size.height; in innolux_panel_get_modes()
356 connector->display_info.bpc = innolux->desc->bpc; in innolux_panel_get_modes()
382 struct device *dev = &dsi->dev; in innolux_panel_add()
387 return -ENOMEM; in innolux_panel_add()
389 innolux->desc = desc; in innolux_panel_add()
391 innolux->supplies = devm_kcalloc(dev, desc->num_supplies, in innolux_panel_add()
392 sizeof(*innolux->supplies), in innolux_panel_add()
394 if (!innolux->supplies) in innolux_panel_add()
395 return -ENOMEM; in innolux_panel_add()
397 for (i = 0; i < desc->num_supplies; i++) in innolux_panel_add()
398 innolux->supplies[i].supply = desc->supply_names[i]; in innolux_panel_add()
400 err = devm_regulator_bulk_get(dev, desc->num_supplies, in innolux_panel_add()
401 innolux->supplies); in innolux_panel_add()
405 innolux->enable_gpio = devm_gpiod_get_optional(dev, "enable", in innolux_panel_add()
407 if (IS_ERR(innolux->enable_gpio)) { in innolux_panel_add()
408 err = PTR_ERR(innolux->enable_gpio); in innolux_panel_add()
410 innolux->enable_gpio = NULL; in innolux_panel_add()
413 drm_panel_init(&innolux->base, dev, &innolux_panel_funcs, in innolux_panel_add()
416 err = drm_panel_of_backlight(&innolux->base); in innolux_panel_add()
420 drm_panel_add(&innolux->base); in innolux_panel_add()
423 innolux->link = dsi; in innolux_panel_add()
430 drm_panel_remove(&innolux->base); in innolux_panel_del()
439 desc = of_device_get_match_data(&dsi->dev); in innolux_panel_probe()
440 dsi->mode_flags = desc->flags; in innolux_panel_probe()
441 dsi->format = desc->format; in innolux_panel_probe()
442 dsi->lanes = desc->lanes; in innolux_panel_probe()
466 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); in innolux_panel_remove()
473 .name = "panel-innolux-p079zca",
481 MODULE_AUTHOR("Chris Zhong <zyw@rock-chips.com>");
482 MODULE_AUTHOR("Lin Huang <hl@rock-chips.com>");