Lines Matching +full:th101mb31ig002 +full:- +full:28 +full:a
1 // SPDX-License-Identifier: GPL-2.0-only
53 gpiod_direction_output(ctx->reset, 0); in boe_th101mb31ig002_reset()
55 gpiod_direction_output(ctx->reset, 1); in boe_th101mb31ig002_reset()
57 gpiod_direction_output(ctx->reset, 0); in boe_th101mb31ig002_reset()
63 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in boe_th101mb31ig002_enable()
120 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in starry_er88577_init_cmd()
185 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in boe_th101mb31ig002_disable()
187 if (ctx->desc->backlight_off_to_display_off_delay_ms) in boe_th101mb31ig002_disable()
188 mipi_dsi_msleep(&dsi_ctx, ctx->desc->backlight_off_to_display_off_delay_ms); in boe_th101mb31ig002_disable()
196 if (ctx->desc->enter_sleep_to_reset_down_delay_ms) in boe_th101mb31ig002_disable()
197 mipi_dsi_msleep(&dsi_ctx, ctx->desc->enter_sleep_to_reset_down_delay_ms); in boe_th101mb31ig002_disable()
208 gpiod_set_value_cansleep(ctx->reset, 1); in boe_th101mb31ig002_unprepare()
209 gpiod_set_value_cansleep(ctx->enable, 0); in boe_th101mb31ig002_unprepare()
210 regulator_disable(ctx->power); in boe_th101mb31ig002_unprepare()
212 if (ctx->desc->power_off_delay_ms) in boe_th101mb31ig002_unprepare()
213 msleep(ctx->desc->power_off_delay_ms); in boe_th101mb31ig002_unprepare()
223 struct device *dev = &ctx->dsi->dev; in boe_th101mb31ig002_prepare()
226 ret = regulator_enable(ctx->power); in boe_th101mb31ig002_prepare()
232 if (ctx->desc->vcioo_to_lp11_delay_ms) in boe_th101mb31ig002_prepare()
233 msleep(ctx->desc->vcioo_to_lp11_delay_ms); in boe_th101mb31ig002_prepare()
235 if (ctx->desc->lp11_before_reset) { in boe_th101mb31ig002_prepare()
236 ret = mipi_dsi_dcs_nop(ctx->dsi); in boe_th101mb31ig002_prepare()
241 if (ctx->desc->lp11_to_reset_delay_ms) in boe_th101mb31ig002_prepare()
242 msleep(ctx->desc->lp11_to_reset_delay_ms); in boe_th101mb31ig002_prepare()
244 gpiod_set_value_cansleep(ctx->enable, 1); in boe_th101mb31ig002_prepare()
248 ret = ctx->desc->init(ctx); in boe_th101mb31ig002_prepare()
316 const struct drm_display_mode *desc_mode = ctx->desc->modes; in boe_th101mb31ig002_get_modes()
318 connector->display_info.bpc = 8; in boe_th101mb31ig002_get_modes()
323 drm_connector_set_panel_orientation(connector, ctx->orientation); in boe_th101mb31ig002_get_modes()
335 return ctx->orientation; in boe_th101mb31ig002_get_orientation()
352 ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); in boe_th101mb31ig002_dsi_probe()
354 return -ENOMEM; in boe_th101mb31ig002_dsi_probe()
357 ctx->dsi = dsi; in boe_th101mb31ig002_dsi_probe()
359 desc = of_device_get_match_data(&dsi->dev); in boe_th101mb31ig002_dsi_probe()
360 dsi->lanes = desc->lanes; in boe_th101mb31ig002_dsi_probe()
361 dsi->format = desc->format; in boe_th101mb31ig002_dsi_probe()
362 dsi->mode_flags = desc->mode_flags; in boe_th101mb31ig002_dsi_probe()
363 ctx->desc = desc; in boe_th101mb31ig002_dsi_probe()
365 ctx->power = devm_regulator_get(&dsi->dev, "power"); in boe_th101mb31ig002_dsi_probe()
366 if (IS_ERR(ctx->power)) in boe_th101mb31ig002_dsi_probe()
367 return dev_err_probe(&dsi->dev, PTR_ERR(ctx->power), in boe_th101mb31ig002_dsi_probe()
370 ctx->enable = devm_gpiod_get(&dsi->dev, "enable", GPIOD_OUT_LOW); in boe_th101mb31ig002_dsi_probe()
371 if (IS_ERR(ctx->enable)) in boe_th101mb31ig002_dsi_probe()
372 return dev_err_probe(&dsi->dev, PTR_ERR(ctx->enable), in boe_th101mb31ig002_dsi_probe()
375 ctx->reset = devm_gpiod_get_optional(&dsi->dev, "reset", GPIOD_OUT_HIGH); in boe_th101mb31ig002_dsi_probe()
376 if (IS_ERR(ctx->reset)) in boe_th101mb31ig002_dsi_probe()
377 return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset), in boe_th101mb31ig002_dsi_probe()
380 ret = of_drm_get_panel_orientation(dsi->dev.of_node, in boe_th101mb31ig002_dsi_probe()
381 &ctx->orientation); in boe_th101mb31ig002_dsi_probe()
383 return dev_err_probe(&dsi->dev, ret, in boe_th101mb31ig002_dsi_probe()
386 drm_panel_init(&ctx->panel, &dsi->dev, &boe_th101mb31ig002_funcs, in boe_th101mb31ig002_dsi_probe()
389 ret = drm_panel_of_backlight(&ctx->panel); in boe_th101mb31ig002_dsi_probe()
393 drm_panel_add(&ctx->panel); in boe_th101mb31ig002_dsi_probe()
397 dev_err_probe(&dsi->dev, ret, in boe_th101mb31ig002_dsi_probe()
399 drm_panel_remove(&ctx->panel); in boe_th101mb31ig002_dsi_probe()
411 drm_panel_remove(&ctx->panel); in boe_th101mb31ig002_dsi_remove()
416 .compatible = "boe,th101mb31ig002-28a",
429 .name = "boe-th101mb31ig002-28a",
438 MODULE_DESCRIPTION("BOE TH101MB31IG002-28A MIPI-DSI LCD panel");