Lines Matching +full:panel +full:- +full:dsi

1 // SPDX-License-Identifier: GPL-2.0-only
2 // Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
18 struct drm_panel panel; member
19 struct mipi_dsi_device *dsi; member
29 static inline struct boe_tv101wum_ll2 *to_boe_tv101wum_ll2(struct drm_panel *panel) in to_boe_tv101wum_ll2() argument
31 return container_of(panel, struct boe_tv101wum_ll2, panel); in to_boe_tv101wum_ll2()
36 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in boe_tv101wum_ll2_reset()
38 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in boe_tv101wum_ll2_reset()
40 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in boe_tv101wum_ll2_reset()
47 struct mipi_dsi_device *dsi = ctx->dsi; in boe_tv101wum_ll2_on() local
48 struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; in boe_tv101wum_ll2_on()
50 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in boe_tv101wum_ll2_on()
78 struct mipi_dsi_device *dsi = ctx->dsi; in boe_tv101wum_ll2_off() local
79 struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; in boe_tv101wum_ll2_off()
81 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in boe_tv101wum_ll2_off()
97 static int boe_tv101wum_ll2_prepare(struct drm_panel *panel) in boe_tv101wum_ll2_prepare() argument
99 struct boe_tv101wum_ll2 *ctx = to_boe_tv101wum_ll2(panel); in boe_tv101wum_ll2_prepare()
103 ctx->supplies); in boe_tv101wum_ll2_prepare()
111 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in boe_tv101wum_ll2_prepare()
113 ctx->supplies); in boe_tv101wum_ll2_prepare()
120 static int boe_tv101wum_ll2_unprepare(struct drm_panel *panel) in boe_tv101wum_ll2_unprepare() argument
122 struct boe_tv101wum_ll2 *ctx = to_boe_tv101wum_ll2(panel); in boe_tv101wum_ll2_unprepare()
127 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in boe_tv101wum_ll2_unprepare()
130 ctx->supplies); in boe_tv101wum_ll2_unprepare()
150 static int boe_tv101wum_ll2_get_modes(struct drm_panel *panel, in boe_tv101wum_ll2_get_modes() argument
163 static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi) in boe_tv101wum_ll2_probe() argument
165 struct device *dev = &dsi->dev; in boe_tv101wum_ll2_probe()
171 return -ENOMEM; in boe_tv101wum_ll2_probe()
173 ret = devm_regulator_bulk_get_const(&dsi->dev, in boe_tv101wum_ll2_probe()
176 &ctx->supplies); in boe_tv101wum_ll2_probe()
180 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in boe_tv101wum_ll2_probe()
181 if (IS_ERR(ctx->reset_gpio)) in boe_tv101wum_ll2_probe()
182 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), in boe_tv101wum_ll2_probe()
183 "Failed to get reset-gpios\n"); in boe_tv101wum_ll2_probe()
185 ctx->dsi = dsi; in boe_tv101wum_ll2_probe()
186 mipi_dsi_set_drvdata(dsi, ctx); in boe_tv101wum_ll2_probe()
188 dsi->lanes = 4; in boe_tv101wum_ll2_probe()
189 dsi->format = MIPI_DSI_FMT_RGB888; in boe_tv101wum_ll2_probe()
190 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | in boe_tv101wum_ll2_probe()
193 drm_panel_init(&ctx->panel, dev, &boe_tv101wum_ll2_panel_funcs, in boe_tv101wum_ll2_probe()
195 ctx->panel.prepare_prev_first = true; in boe_tv101wum_ll2_probe()
197 ret = drm_panel_of_backlight(&ctx->panel); in boe_tv101wum_ll2_probe()
201 drm_panel_add(&ctx->panel); in boe_tv101wum_ll2_probe()
203 ret = mipi_dsi_attach(dsi); in boe_tv101wum_ll2_probe()
205 drm_panel_remove(&ctx->panel); in boe_tv101wum_ll2_probe()
206 return dev_err_probe(dev, ret, "Failed to attach to DSI host\n"); in boe_tv101wum_ll2_probe()
212 static void boe_tv101wum_ll2_remove(struct mipi_dsi_device *dsi) in boe_tv101wum_ll2_remove() argument
214 struct boe_tv101wum_ll2 *ctx = mipi_dsi_get_drvdata(dsi); in boe_tv101wum_ll2_remove()
217 ret = mipi_dsi_detach(dsi); in boe_tv101wum_ll2_remove()
219 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in boe_tv101wum_ll2_remove()
221 drm_panel_remove(&ctx->panel); in boe_tv101wum_ll2_remove()
225 { .compatible = "boe,tv101wum-ll2" },
234 .name = "panel-boe-tv101wum_ll2",
240 MODULE_DESCRIPTION("DRM driver for BOE TV101WUM-LL2 Panel");