Lines Matching +full:vpnl +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2019-2024 Linaro Ltd
44 struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link }; in sw43408_unprepare()
53 gpiod_set_value(sw43408->reset_gpio, 1); in sw43408_unprepare()
55 ret = regulator_bulk_disable(ARRAY_SIZE(sw43408->supplies), sw43408->supplies); in sw43408_unprepare()
63 struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link }; in sw43408_program()
104 sw43408->link->mode_flags &= ~MIPI_DSI_MODE_LPM; in sw43408_program()
106 drm_dsc_pps_payload_pack(&pps, sw43408->link->dsc); in sw43408_program()
110 sw43408->link->mode_flags |= MIPI_DSI_MODE_LPM; in sw43408_program()
127 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sw43408_prepare()
133 gpiod_set_value(ctx->reset_gpio, 0); in sw43408_prepare()
135 gpiod_set_value(ctx->reset_gpio, 1); in sw43408_prepare()
137 gpiod_set_value(ctx->reset_gpio, 0); in sw43408_prepare()
147 gpiod_set_value(ctx->reset_gpio, 1); in sw43408_prepare()
148 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sw43408_prepare()
191 struct device *dev = &ctx->link->dev; in sw43408_backlight_init()
198 ctx->base.backlight = devm_backlight_device_register(dev, dev_name(dev), dev, in sw43408_backlight_init()
199 ctx->link, in sw43408_backlight_init()
203 if (IS_ERR(ctx->base.backlight)) in sw43408_backlight_init()
204 return dev_err_probe(dev, PTR_ERR(ctx->base.backlight), in sw43408_backlight_init()
224 struct device *dev = &ctx->link->dev; in sw43408_add()
227 ctx->supplies[0].supply = "vddi"; /* 1.88 V */ in sw43408_add()
228 ctx->supplies[0].init_load_uA = 62000; in sw43408_add()
229 ctx->supplies[1].supply = "vpnl"; /* 3.0 V */ in sw43408_add()
230 ctx->supplies[1].init_load_uA = 857000; in sw43408_add()
232 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in sw43408_add()
233 ctx->supplies); in sw43408_add()
237 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in sw43408_add()
238 if (IS_ERR(ctx->reset_gpio)) { in sw43408_add()
239 ret = PTR_ERR(ctx->reset_gpio); in sw43408_add()
247 ctx->base.prepare_prev_first = true; in sw43408_add()
249 drm_panel_init(&ctx->base, dev, &sw43408_funcs, DRM_MODE_CONNECTOR_DSI); in sw43408_add()
251 drm_panel_add(&ctx->base); in sw43408_add()
260 ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); in sw43408_probe()
262 return -ENOMEM; in sw43408_probe()
264 dsi->mode_flags = MIPI_DSI_MODE_LPM; in sw43408_probe()
265 dsi->format = MIPI_DSI_FMT_RGB888; in sw43408_probe()
266 dsi->lanes = 4; in sw43408_probe()
268 ctx->link = dsi; in sw43408_probe()
276 ctx->dsc.dsc_version_major = 0x1; in sw43408_probe()
277 ctx->dsc.dsc_version_minor = 0x1; in sw43408_probe()
280 ctx->dsc.slice_height = 16; in sw43408_probe()
281 ctx->dsc.slice_width = 540; in sw43408_probe()
282 ctx->dsc.slice_count = 2; in sw43408_probe()
283 ctx->dsc.bits_per_component = 8; in sw43408_probe()
284 ctx->dsc.bits_per_pixel = 8 << 4; in sw43408_probe()
285 ctx->dsc.block_pred_enable = true; in sw43408_probe()
287 dsi->dsc = &ctx->dsc; in sw43408_probe()
297 ret = sw43408_unprepare(&ctx->base); in sw43408_remove()
299 dev_err(&dsi->dev, "failed to unprepare panel: %d\n", ret); in sw43408_remove()
303 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); in sw43408_remove()
305 drm_panel_remove(&ctx->base); in sw43408_remove()
310 .name = "panel-lg-sw43408",
319 MODULE_DESCRIPTION("LG SW436408 MIPI-DSI LED panel");