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

1 // SPDX-License-Identifier: GPL-2.0-only
19 "avee",
362 struct mipi_dsi_device *dsi = ctx->dsi; in nt36672e_power_on()
365 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in nt36672e_power_on()
367 dev_err(&dsi->dev, "regulator bulk enable failed: %d\n", ret); in nt36672e_power_on()
375 gpiod_set_value(ctx->reset_gpio, 1); in nt36672e_power_on()
377 gpiod_set_value(ctx->reset_gpio, 0); in nt36672e_power_on()
379 gpiod_set_value(ctx->reset_gpio, 1); in nt36672e_power_on()
387 struct mipi_dsi_device *dsi = ctx->dsi; in nt36672e_power_off()
390 gpiod_set_value(ctx->reset_gpio, 0); in nt36672e_power_off()
392 ret = regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in nt36672e_power_off()
394 dev_err(&dsi->dev, "regulator bulk disable failed: %d\n", ret); in nt36672e_power_off()
401 struct mipi_dsi_multi_context ctx = { .dsi = nt36672e->dsi }; in nt36672e_on()
402 const struct panel_desc *desc = nt36672e->desc; in nt36672e_on()
404 nt36672e->dsi->mode_flags |= MIPI_DSI_MODE_LPM; in nt36672e_on()
406 if (desc->init_sequence) in nt36672e_on()
407 desc->init_sequence(&ctx); in nt36672e_on()
421 struct mipi_dsi_multi_context ctx = { .dsi = panel->dsi }; in nt36672e_off()
423 panel->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in nt36672e_off()
437 struct mipi_dsi_device *dsi = ctx->dsi; in nt36672e_panel_prepare()
447 dev_err(&dsi->dev, "power off failed\n"); in nt36672e_panel_prepare()
457 struct mipi_dsi_device *dsi = ctx->dsi; in nt36672e_panel_unprepare()
464 dev_err(&dsi->dev, "power off failed: %d\n", ret); in nt36672e_panel_unprepare()
499 mode = drm_mode_duplicate(connector->dev, ctx->desc->display_mode); in nt36672e_panel_get_modes()
501 return -ENOMEM; in nt36672e_panel_get_modes()
505 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in nt36672e_panel_get_modes()
506 connector->display_info.width_mm = ctx->desc->width_mm; in nt36672e_panel_get_modes()
507 connector->display_info.height_mm = ctx->desc->height_mm; in nt36672e_panel_get_modes()
521 struct device *dev = &dsi->dev; in nt36672e_panel_probe()
527 return -ENOMEM; in nt36672e_panel_probe()
529 ctx->desc = of_device_get_match_data(dev); in nt36672e_panel_probe()
530 if (!ctx->desc) { in nt36672e_panel_probe()
532 return -ENODEV; in nt36672e_panel_probe()
535 for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) { in nt36672e_panel_probe()
536 ctx->supplies[i].supply = regulator_names[i]; in nt36672e_panel_probe()
537 ctx->supplies[i].init_load_uA = regulator_enable_loads[i]; in nt36672e_panel_probe()
540 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in nt36672e_panel_probe()
541 ctx->supplies); in nt36672e_panel_probe()
545 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in nt36672e_panel_probe()
546 if (IS_ERR(ctx->reset_gpio)) in nt36672e_panel_probe()
547 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "Failed to get reset-gpios\n"); in nt36672e_panel_probe()
549 ctx->dsi = dsi; in nt36672e_panel_probe()
552 dsi->lanes = ctx->desc->lanes; in nt36672e_panel_probe()
553 dsi->format = ctx->desc->format; in nt36672e_panel_probe()
554 dsi->mode_flags = ctx->desc->mode_flags; in nt36672e_panel_probe()
556 drm_panel_init(&ctx->panel, dev, &nt36672e_drm_funcs, DRM_MODE_CONNECTOR_DSI); in nt36672e_panel_probe()
558 ret = drm_panel_of_backlight(&ctx->panel); in nt36672e_panel_probe()
562 ctx->panel.prepare_prev_first = true; in nt36672e_panel_probe()
564 drm_panel_add(&ctx->panel); in nt36672e_panel_probe()
575 drm_panel_remove(&ctx->panel); in nt36672e_panel_probe()
583 mipi_dsi_detach(ctx->dsi); in nt36672e_panel_remove()
584 drm_panel_remove(&ctx->panel); in nt36672e_panel_remove()
598 .name = "panel-novatek-nt36672e",