Lines Matching refs:ctx

47 static void ebbg_ft8719_reset(struct ebbg_ft8719 *ctx)
49 gpiod_set_value_cansleep(ctx->reset_gpio, 0);
51 gpiod_set_value_cansleep(ctx->reset_gpio, 1);
53 gpiod_set_value_cansleep(ctx->reset_gpio, 0);
57 static int ebbg_ft8719_on(struct ebbg_ft8719 *ctx)
59 struct mipi_dsi_device *dsi = ctx->dsi;
90 static int ebbg_ft8719_off(struct ebbg_ft8719 *ctx)
92 struct mipi_dsi_device *dsi = ctx->dsi;
117 struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
118 struct device *dev = &ctx->dsi->dev;
121 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
125 ebbg_ft8719_reset(ctx);
127 ret = ebbg_ft8719_on(ctx);
130 gpiod_set_value_cansleep(ctx->reset_gpio, 1);
139 struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
140 struct device *dev = &ctx->dsi->dev;
143 ret = ebbg_ft8719_off(ctx);
147 gpiod_set_value_cansleep(ctx->reset_gpio, 1);
149 ret = regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
198 struct ebbg_ft8719 *ctx;
201 ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
202 if (!ctx)
205 for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++)
206 ctx->supplies[i].supply = regulator_names[i];
208 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
209 ctx->supplies);
213 for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) {
214 ret = regulator_set_load(ctx->supplies[i].consumer,
221 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
222 if (IS_ERR(ctx->reset_gpio))
223 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
226 ctx->dsi = dsi;
227 mipi_dsi_set_drvdata(dsi, ctx);
234 drm_panel_init(&ctx->panel, dev, &ebbg_ft8719_panel_funcs,
237 ret = drm_panel_of_backlight(&ctx->panel);
241 drm_panel_add(&ctx->panel);
246 drm_panel_remove(&ctx->panel);
255 struct ebbg_ft8719 *ctx = mipi_dsi_get_drvdata(dsi);
262 drm_panel_remove(&ctx->panel);