Lines Matching +full:vddh +full:- +full:regulator
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
4 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
11 #include <linux/regulator/consumer.h>
22 struct regulator *vddi_supply;
23 struct regulator *vddh_supply;
24 struct regulator *avdd_supply;
25 struct regulator *avee_supply;
36 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in sharp_ls060_reset()
38 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in sharp_ls060_reset()
40 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in sharp_ls060_reset()
46 struct mipi_dsi_device *dsi = ctx->dsi; in sharp_ls060_on()
47 struct device *dev = &dsi->dev; in sharp_ls060_on()
50 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in sharp_ls060_on()
74 struct mipi_dsi_device *dsi = ctx->dsi; in sharp_ls060_off()
75 struct device *dev = &dsi->dev; in sharp_ls060_off()
78 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in sharp_ls060_off()
100 struct device *dev = &ctx->dsi->dev; in sharp_ls060_prepare()
103 ret = regulator_enable(ctx->vddi_supply); in sharp_ls060_prepare()
107 ret = regulator_enable(ctx->avdd_supply); in sharp_ls060_prepare()
113 ret = regulator_enable(ctx->avee_supply); in sharp_ls060_prepare()
119 ret = regulator_enable(ctx->vddh_supply); in sharp_ls060_prepare()
136 regulator_disable(ctx->vddh_supply); in sharp_ls060_prepare()
141 regulator_disable(ctx->avee_supply); in sharp_ls060_prepare()
144 regulator_disable(ctx->avdd_supply); in sharp_ls060_prepare()
146 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in sharp_ls060_prepare()
149 regulator_disable(ctx->vddi_supply); in sharp_ls060_prepare()
157 struct device *dev = &ctx->dsi->dev; in sharp_ls060_unprepare()
162 dev_err(dev, "Failed to un-initialize panel: %d\n", ret); in sharp_ls060_unprepare()
164 regulator_disable(ctx->vddh_supply); in sharp_ls060_unprepare()
168 regulator_disable(ctx->avee_supply); in sharp_ls060_unprepare()
169 regulator_disable(ctx->avdd_supply); in sharp_ls060_unprepare()
171 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in sharp_ls060_unprepare()
173 regulator_disable(ctx->vddi_supply); in sharp_ls060_unprepare()
197 mode = drm_mode_duplicate(connector->dev, &sharp_ls060_mode); in sharp_ls060_get_modes()
199 return -ENOMEM; in sharp_ls060_get_modes()
203 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in sharp_ls060_get_modes()
204 connector->display_info.width_mm = mode->width_mm; in sharp_ls060_get_modes()
205 connector->display_info.height_mm = mode->height_mm; in sharp_ls060_get_modes()
219 struct device *dev = &dsi->dev; in sharp_ls060_probe()
225 return -ENOMEM; in sharp_ls060_probe()
227 ctx->vddi_supply = devm_regulator_get(dev, "vddi"); in sharp_ls060_probe()
228 if (IS_ERR(ctx->vddi_supply)) in sharp_ls060_probe()
229 return PTR_ERR(ctx->vddi_supply); in sharp_ls060_probe()
231 ctx->vddh_supply = devm_regulator_get(dev, "vddh"); in sharp_ls060_probe()
232 if (IS_ERR(ctx->vddh_supply)) in sharp_ls060_probe()
233 return PTR_ERR(ctx->vddh_supply); in sharp_ls060_probe()
235 ctx->avdd_supply = devm_regulator_get(dev, "avdd"); in sharp_ls060_probe()
236 if (IS_ERR(ctx->avdd_supply)) in sharp_ls060_probe()
237 return PTR_ERR(ctx->avdd_supply); in sharp_ls060_probe()
239 ctx->avee_supply = devm_regulator_get(dev, "avee"); in sharp_ls060_probe()
240 if (IS_ERR(ctx->avee_supply)) in sharp_ls060_probe()
241 return PTR_ERR(ctx->avee_supply); in sharp_ls060_probe()
243 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in sharp_ls060_probe()
244 if (IS_ERR(ctx->reset_gpio)) in sharp_ls060_probe()
245 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), in sharp_ls060_probe()
246 "Failed to get reset-gpios\n"); in sharp_ls060_probe()
248 ctx->dsi = dsi; in sharp_ls060_probe()
251 dsi->lanes = 4; in sharp_ls060_probe()
252 dsi->format = MIPI_DSI_FMT_RGB888; in sharp_ls060_probe()
253 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | in sharp_ls060_probe()
257 drm_panel_init(&ctx->panel, dev, &sharp_ls060_panel_funcs, in sharp_ls060_probe()
260 ret = drm_panel_of_backlight(&ctx->panel); in sharp_ls060_probe()
264 drm_panel_add(&ctx->panel); in sharp_ls060_probe()
269 drm_panel_remove(&ctx->panel); in sharp_ls060_probe()
283 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in sharp_ls060_remove()
285 drm_panel_remove(&ctx->panel); in sharp_ls060_remove()
298 .name = "panel-sharp-ls060t1sx01",