Lines Matching +full:vdd3 +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0-only
120 int ret = ctx->error; in ld9040_clear_error()
122 ctx->error = 0; in ld9040_clear_error()
128 struct spi_device *spi = to_spi_device(ctx->dev); in ld9040_spi_write_word()
145 if (ctx->error < 0 || len == 0) in ld9040_dcs_write()
148 dev_dbg(ctx->dev, "writing dcs seq: %*ph\n", (int)len, data); in ld9040_dcs_write()
151 while (!ret && --len) { in ld9040_dcs_write()
157 dev_err(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, in ld9040_dcs_write()
159 ctx->error = ret; in ld9040_dcs_write()
173 ld9040_dcs_write(ctx, ld9040_gammas[ctx->brightness], in ld9040_brightness_set()
174 ARRAY_SIZE(ld9040_gammas[ctx->brightness])); in ld9040_brightness_set()
202 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in ld9040_power_on()
206 msleep(ctx->power_on_delay); in ld9040_power_on()
207 gpiod_set_value(ctx->reset_gpio, 0); in ld9040_power_on()
208 msleep(ctx->reset_delay); in ld9040_power_on()
209 gpiod_set_value(ctx->reset_gpio, 1); in ld9040_power_on()
210 msleep(ctx->reset_delay); in ld9040_power_on()
217 return regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in ld9040_power_off()
269 mode = drm_mode_create(connector->dev); in ld9040_get_modes()
271 dev_err(panel->dev, "failed to create a new display mode\n"); in ld9040_get_modes()
275 drm_display_mode_from_videomode(&ctx->vm, mode); in ld9040_get_modes()
276 mode->width_mm = ctx->width_mm; in ld9040_get_modes()
277 mode->height_mm = ctx->height_mm; in ld9040_get_modes()
278 connector->display_info.width_mm = mode->width_mm; in ld9040_get_modes()
279 connector->display_info.height_mm = mode->height_mm; in ld9040_get_modes()
281 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in ld9040_get_modes()
297 struct device *dev = ctx->dev; in ld9040_parse_dt()
298 struct device_node *np = dev->of_node; in ld9040_parse_dt()
301 ret = of_get_videomode(np, &ctx->vm, 0); in ld9040_parse_dt()
305 of_property_read_u32(np, "power-on-delay", &ctx->power_on_delay); in ld9040_parse_dt()
306 of_property_read_u32(np, "reset-delay", &ctx->reset_delay); in ld9040_parse_dt()
307 of_property_read_u32(np, "panel-width-mm", &ctx->width_mm); in ld9040_parse_dt()
308 of_property_read_u32(np, "panel-height-mm", &ctx->height_mm); in ld9040_parse_dt()
315 struct device *dev = &spi->dev; in ld9040_probe()
321 return -ENOMEM; in ld9040_probe()
325 ctx->dev = dev; in ld9040_probe()
326 ctx->brightness = ARRAY_SIZE(ld9040_gammas) - 1; in ld9040_probe()
332 ctx->supplies[0].supply = "vdd3"; in ld9040_probe()
333 ctx->supplies[1].supply = "vci"; in ld9040_probe()
334 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in ld9040_probe()
335 ctx->supplies); in ld9040_probe()
339 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in ld9040_probe()
340 if (IS_ERR(ctx->reset_gpio)) { in ld9040_probe()
341 dev_err(dev, "cannot get reset-gpios %ld\n", in ld9040_probe()
342 PTR_ERR(ctx->reset_gpio)); in ld9040_probe()
343 return PTR_ERR(ctx->reset_gpio); in ld9040_probe()
346 spi->bits_per_word = 9; in ld9040_probe()
353 drm_panel_init(&ctx->panel, dev, &ld9040_drm_funcs, in ld9040_probe()
356 drm_panel_add(&ctx->panel); in ld9040_probe()
366 drm_panel_remove(&ctx->panel); in ld9040_remove()
386 .name = "panel-samsung-ld9040",