Lines Matching +full:power +full:- +full:supplies

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Generated with linux-mdss-dsi-panel-driver-generator with a
9 * - "JDI ID3" for Akari (XZ2)
10 * - "JDI ID4" for Apollo (XZ2 Compact)
28 * Leaving room for expansion - SONY very often uses
36 struct regulator_bulk_data supplies[3]; member
50 struct mipi_dsi_device *dsi = ctx->dsi; in sony_td4353_jdi_on()
51 struct device *dev = &dsi->dev; in sony_td4353_jdi_on()
54 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in sony_td4353_jdi_on()
56 ret = mipi_dsi_dcs_set_column_address(dsi, 0x0000, 1080 - 1); in sony_td4353_jdi_on()
62 ret = mipi_dsi_dcs_set_page_address(dsi, 0x0000, 2160 - 1); in sony_td4353_jdi_on()
111 struct mipi_dsi_device *dsi = ctx->dsi; in sony_td4353_jdi_off()
112 struct device *dev = &dsi->dev; in sony_td4353_jdi_off()
115 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in sony_td4353_jdi_off()
142 gpiod_set_value_cansleep(ctx->touch_reset_gpio, mode); in sony_td4353_assert_reset_gpios()
143 gpiod_set_value_cansleep(ctx->panel_reset_gpio, mode); in sony_td4353_assert_reset_gpios()
150 struct device *dev = &ctx->dsi->dev; in sony_td4353_jdi_prepare()
153 if (ctx->prepared) in sony_td4353_jdi_prepare()
156 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sony_td4353_jdi_prepare()
168 dev_err(dev, "Failed to power on panel: %d\n", ret); in sony_td4353_jdi_prepare()
170 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sony_td4353_jdi_prepare()
174 ctx->prepared = true; in sony_td4353_jdi_prepare()
181 struct device *dev = &ctx->dsi->dev; in sony_td4353_jdi_unprepare()
184 if (!ctx->prepared) in sony_td4353_jdi_unprepare()
189 dev_err(dev, "Failed to power off panel: %d\n", ret); in sony_td4353_jdi_unprepare()
192 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sony_td4353_jdi_unprepare()
194 ctx->prepared = false; in sony_td4353_jdi_unprepare()
218 if (ctx->type == TYPE_TAMA_60HZ) in sony_td4353_jdi_get_modes()
219 mode = drm_mode_duplicate(connector->dev, &sony_td4353_jdi_mode_tama_60hz); in sony_td4353_jdi_get_modes()
221 return -EINVAL; in sony_td4353_jdi_get_modes()
224 return -ENOMEM; in sony_td4353_jdi_get_modes()
228 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in sony_td4353_jdi_get_modes()
229 connector->display_info.width_mm = mode->width_mm; in sony_td4353_jdi_get_modes()
230 connector->display_info.height_mm = mode->height_mm; in sony_td4353_jdi_get_modes()
244 struct device *dev = &dsi->dev; in sony_td4353_jdi_probe()
250 return -ENOMEM; in sony_td4353_jdi_probe()
252 ctx->type = (uintptr_t)of_device_get_match_data(dev); in sony_td4353_jdi_probe()
254 ctx->supplies[0].supply = "vddio"; in sony_td4353_jdi_probe()
255 ctx->supplies[1].supply = "vsp"; in sony_td4353_jdi_probe()
256 ctx->supplies[2].supply = "vsn"; in sony_td4353_jdi_probe()
257 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in sony_td4353_jdi_probe()
258 ctx->supplies); in sony_td4353_jdi_probe()
262 ctx->panel_reset_gpio = devm_gpiod_get(dev, "panel-reset", GPIOD_ASIS); in sony_td4353_jdi_probe()
263 if (IS_ERR(ctx->panel_reset_gpio)) in sony_td4353_jdi_probe()
264 return dev_err_probe(dev, PTR_ERR(ctx->panel_reset_gpio), in sony_td4353_jdi_probe()
265 "Failed to get panel-reset-gpios\n"); in sony_td4353_jdi_probe()
267 ctx->touch_reset_gpio = devm_gpiod_get(dev, "touch-reset", GPIOD_ASIS); in sony_td4353_jdi_probe()
268 if (IS_ERR(ctx->touch_reset_gpio)) in sony_td4353_jdi_probe()
269 return dev_err_probe(dev, PTR_ERR(ctx->touch_reset_gpio), in sony_td4353_jdi_probe()
270 "Failed to get touch-reset-gpios\n"); in sony_td4353_jdi_probe()
272 ctx->dsi = dsi; in sony_td4353_jdi_probe()
275 dsi->lanes = 4; in sony_td4353_jdi_probe()
276 dsi->format = MIPI_DSI_FMT_RGB888; in sony_td4353_jdi_probe()
277 dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS; in sony_td4353_jdi_probe()
279 drm_panel_init(&ctx->panel, dev, &sony_td4353_jdi_panel_funcs, in sony_td4353_jdi_probe()
282 ret = drm_panel_of_backlight(&ctx->panel); in sony_td4353_jdi_probe()
286 drm_panel_add(&ctx->panel); in sony_td4353_jdi_probe()
291 drm_panel_remove(&ctx->panel); in sony_td4353_jdi_probe()
305 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in sony_td4353_jdi_remove()
307 drm_panel_remove(&ctx->panel); in sony_td4353_jdi_remove()
311 { .compatible = "sony,td4353-jdi-tama", .data = (void *)TYPE_TAMA_60HZ },
320 .name = "panel-sony-td4353-jdi",