Lines Matching +full:iovcc +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0
8 * - Vinay Simha BN <simhavcs@gmail.com>
9 * - Sumit Semwal <sumit.semwal@linaro.org>
10 * - Guillaume La Roque <glaroque@baylibre.com>
33 IOVCC = 0, enumerator
41 struct gpio_desc *enable_gpio; /* Power IC supply enable */
54 struct mipi_dsi_device *dsi = stk->dsi; in stk_panel_init()
75 mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0, stk->mode->hdisplay - 1); in stk_panel_init()
76 mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0, stk->mode->vdisplay - 1); in stk_panel_init()
83 struct mipi_dsi_device *dsi = stk->dsi; in stk_panel_on()
95 struct mipi_dsi_device *dsi = stk->dsi; in stk_panel_off()
98 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in stk_panel_off()
111 regulator_bulk_disable(ARRAY_SIZE(stk->supplies), stk->supplies); in stk_panel_unprepare()
112 gpiod_set_value(stk->reset_gpio, 0); in stk_panel_unprepare()
113 gpiod_set_value(stk->enable_gpio, 1); in stk_panel_unprepare()
123 gpiod_set_value(stk->reset_gpio, 0); in stk_panel_prepare()
124 gpiod_set_value(stk->enable_gpio, 0); in stk_panel_prepare()
125 ret = regulator_enable(stk->supplies[IOVCC].consumer); in stk_panel_prepare()
130 ret = regulator_enable(stk->supplies[POWER].consumer); in stk_panel_prepare()
135 gpiod_set_value(stk->enable_gpio, 1); in stk_panel_prepare()
137 gpiod_set_value(stk->reset_gpio, 1); in stk_panel_prepare()
150 regulator_disable(stk->supplies[POWER].consumer); in stk_panel_prepare()
152 regulator_disable(stk->supplies[IOVCC].consumer); in stk_panel_prepare()
153 gpiod_set_value(stk->reset_gpio, 0); in stk_panel_prepare()
154 gpiod_set_value(stk->enable_gpio, 0); in stk_panel_prepare()
178 mode = drm_mode_duplicate(connector->dev, &default_mode); in stk_panel_get_modes()
180 dev_err(panel->dev, "failed to add mode %ux%ux@%u\n", in stk_panel_get_modes()
183 return -ENOMEM; in stk_panel_get_modes()
188 connector->display_info.width_mm = default_mode.width_mm; in stk_panel_get_modes()
189 connector->display_info.height_mm = default_mode.height_mm; in stk_panel_get_modes()
199 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in dsi_dcs_bl_get_brightness()
204 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in dsi_dcs_bl_get_brightness()
213 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in dsi_dcs_bl_update_status()
214 mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, bl->props.brightness); in dsi_dcs_bl_update_status()
218 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in dsi_dcs_bl_update_status()
230 struct device *dev = &dsi->dev; in drm_panel_create_dsi_backlight()
255 struct device *dev = &stk->dsi->dev; in stk_panel_add()
258 stk->mode = &default_mode; in stk_panel_add()
260 stk->supplies[IOVCC].supply = "iovcc"; in stk_panel_add()
261 stk->supplies[POWER].supply = "power"; in stk_panel_add()
262 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(stk->supplies), stk->supplies); in stk_panel_add()
268 stk->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in stk_panel_add()
269 if (IS_ERR(stk->reset_gpio)) { in stk_panel_add()
270 ret = PTR_ERR(stk->reset_gpio); in stk_panel_add()
271 dev_err(dev, "cannot get reset-gpios %d\n", ret); in stk_panel_add()
275 stk->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in stk_panel_add()
276 if (IS_ERR(stk->enable_gpio)) { in stk_panel_add()
277 ret = PTR_ERR(stk->enable_gpio); in stk_panel_add()
278 dev_err(dev, "cannot get enable-gpio %d\n", ret); in stk_panel_add()
282 stk->backlight = drm_panel_create_dsi_backlight(stk->dsi); in stk_panel_add()
283 if (IS_ERR(stk->backlight)) { in stk_panel_add()
284 ret = PTR_ERR(stk->backlight); in stk_panel_add()
289 drm_panel_init(&stk->base, &stk->dsi->dev, &stk_panel_funcs, in stk_panel_add()
292 drm_panel_add(&stk->base); in stk_panel_add()
302 dsi->lanes = 4; in stk_panel_probe()
303 dsi->format = MIPI_DSI_FMT_RGB888; in stk_panel_probe()
304 dsi->mode_flags = (MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM); in stk_panel_probe()
306 stk = devm_kzalloc(&dsi->dev, sizeof(*stk), GFP_KERNEL); in stk_panel_probe()
308 return -ENOMEM; in stk_panel_probe()
312 stk->dsi = dsi; in stk_panel_probe()
320 drm_panel_remove(&stk->base); in stk_panel_probe()
332 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", in stk_panel_remove()
335 drm_panel_remove(&stk->base); in stk_panel_remove()
340 .name = "panel-startek-kd070fhfid015",