Lines Matching +full:j716f +full:- +full:edo +full:- +full:rm69380

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree.
38 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in rm69380_reset()
40 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm69380_reset()
42 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in rm69380_reset()
48 struct mipi_dsi_device *dsi = ctx->dsi[0]; in rm69380_on()
49 struct device *dev = &dsi->dev; in rm69380_on()
52 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in rm69380_on()
53 if (ctx->dsi[1]) in rm69380_on()
54 ctx->dsi[1]->mode_flags |= MIPI_DSI_MODE_LPM; in rm69380_on()
92 struct mipi_dsi_device *dsi = ctx->dsi[0]; in rm69380_off()
93 struct device *dev = &dsi->dev; in rm69380_off()
96 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm69380_off()
97 if (ctx->dsi[1]) in rm69380_off()
98 ctx->dsi[1]->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm69380_off()
120 struct device *dev = &ctx->dsi[0]->dev; in rm69380_prepare()
123 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in rm69380_prepare()
134 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm69380_prepare()
135 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in rm69380_prepare()
145 struct device *dev = &ctx->dsi[0]->dev; in rm69380_unprepare()
150 dev_err(dev, "Failed to un-initialize panel: %d\n", ret); in rm69380_unprepare()
152 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm69380_unprepare()
153 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in rm69380_unprepare()
191 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm69380_bl_update_status()
197 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in rm69380_bl_update_status()
208 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm69380_bl_get_brightness()
214 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in rm69380_bl_get_brightness()
227 struct device *dev = &dsi->dev; in rm69380_create_backlight()
242 struct device *dev = &dsi->dev; in rm69380_probe()
248 return -ENOMEM; in rm69380_probe()
250 ctx->supplies[0].supply = "vddio"; in rm69380_probe()
251 ctx->supplies[1].supply = "avdd"; in rm69380_probe()
252 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in rm69380_probe()
253 ctx->supplies); in rm69380_probe()
257 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in rm69380_probe()
258 if (IS_ERR(ctx->reset_gpio)) in rm69380_probe()
259 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), in rm69380_probe()
260 "Failed to get reset-gpios\n"); in rm69380_probe()
262 dsi_sec = of_graph_get_remote_node(dsi->dev.of_node, 1, -1); in rm69380_probe()
265 const struct mipi_dsi_device_info info = { "RM69380 DSI1", 0, in rm69380_probe()
271 return dev_err_probe(dev, -EPROBE_DEFER, in rm69380_probe()
274 ctx->dsi[1] = in rm69380_probe()
276 if (IS_ERR(ctx->dsi[1])) in rm69380_probe()
277 return dev_err_probe(dev, PTR_ERR(ctx->dsi[1]), in rm69380_probe()
280 mipi_dsi_set_drvdata(ctx->dsi[1], ctx); in rm69380_probe()
283 ctx->dsi[0] = dsi; in rm69380_probe()
286 drm_panel_init(&ctx->panel, dev, &rm69380_panel_funcs, in rm69380_probe()
288 ctx->panel.prepare_prev_first = true; in rm69380_probe()
290 ctx->panel.backlight = rm69380_create_backlight(dsi); in rm69380_probe()
291 if (IS_ERR(ctx->panel.backlight)) in rm69380_probe()
292 return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight), in rm69380_probe()
295 drm_panel_add(&ctx->panel); in rm69380_probe()
297 for (i = 0; i < ARRAY_SIZE(ctx->dsi); i++) { in rm69380_probe()
298 if (!ctx->dsi[i]) in rm69380_probe()
301 dev_dbg(&ctx->dsi[i]->dev, "Binding DSI %d\n", i); in rm69380_probe()
303 ctx->dsi[i]->lanes = 4; in rm69380_probe()
304 ctx->dsi[i]->format = MIPI_DSI_FMT_RGB888; in rm69380_probe()
305 ctx->dsi[i]->mode_flags = MIPI_DSI_MODE_VIDEO_BURST | in rm69380_probe()
308 ret = devm_mipi_dsi_attach(dev, ctx->dsi[i]); in rm69380_probe()
310 drm_panel_remove(&ctx->panel); in rm69380_probe()
323 drm_panel_remove(&ctx->panel); in rm69380_remove()
327 { .compatible = "lenovo,j716f-edo-rm69380" },
336 .name = "panel-raydium-rm69380",
343 MODULE_DESCRIPTION("DRM driver for Raydium RM69380-equipped DSI panels");