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
49 struct mipi_dsi_device *dsi = ctx->dsi; in sony_td4353_jdi_on()
50 struct device *dev = &dsi->dev; in sony_td4353_jdi_on()
53 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in sony_td4353_jdi_on()
55 ret = mipi_dsi_dcs_set_column_address(dsi, 0x0000, 1080 - 1); in sony_td4353_jdi_on()
61 ret = mipi_dsi_dcs_set_page_address(dsi, 0x0000, 2160 - 1); in sony_td4353_jdi_on()
110 struct mipi_dsi_device *dsi = ctx->dsi; in sony_td4353_jdi_off()
111 struct device *dev = &dsi->dev; in sony_td4353_jdi_off()
114 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in sony_td4353_jdi_off()
141 gpiod_set_value_cansleep(ctx->touch_reset_gpio, mode); in sony_td4353_assert_reset_gpios()
142 gpiod_set_value_cansleep(ctx->panel_reset_gpio, mode); in sony_td4353_assert_reset_gpios()
149 struct device *dev = &ctx->dsi->dev; in sony_td4353_jdi_prepare()
152 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sony_td4353_jdi_prepare()
164 dev_err(dev, "Failed to power on panel: %d\n", ret); in sony_td4353_jdi_prepare()
166 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sony_td4353_jdi_prepare()
176 struct device *dev = &ctx->dsi->dev; in sony_td4353_jdi_unprepare()
181 dev_err(dev, "Failed to power off panel: %d\n", ret); in sony_td4353_jdi_unprepare()
184 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in sony_td4353_jdi_unprepare()
209 if (ctx->type == TYPE_TAMA_60HZ) in sony_td4353_jdi_get_modes()
210 mode = drm_mode_duplicate(connector->dev, &sony_td4353_jdi_mode_tama_60hz); in sony_td4353_jdi_get_modes()
212 return -EINVAL; in sony_td4353_jdi_get_modes()
215 return -ENOMEM; in sony_td4353_jdi_get_modes()
219 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in sony_td4353_jdi_get_modes()
220 connector->display_info.width_mm = mode->width_mm; in sony_td4353_jdi_get_modes()
221 connector->display_info.height_mm = mode->height_mm; in sony_td4353_jdi_get_modes()
235 struct device *dev = &dsi->dev; in sony_td4353_jdi_probe()
241 return -ENOMEM; in sony_td4353_jdi_probe()
243 ctx->type = (uintptr_t)of_device_get_match_data(dev); in sony_td4353_jdi_probe()
245 ctx->supplies[0].supply = "vddio"; in sony_td4353_jdi_probe()
246 ctx->supplies[1].supply = "vsp"; in sony_td4353_jdi_probe()
247 ctx->supplies[2].supply = "vsn"; in sony_td4353_jdi_probe()
248 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in sony_td4353_jdi_probe()
249 ctx->supplies); in sony_td4353_jdi_probe()
253 ctx->panel_reset_gpio = devm_gpiod_get(dev, "panel-reset", GPIOD_ASIS); in sony_td4353_jdi_probe()
254 if (IS_ERR(ctx->panel_reset_gpio)) in sony_td4353_jdi_probe()
255 return dev_err_probe(dev, PTR_ERR(ctx->panel_reset_gpio), in sony_td4353_jdi_probe()
256 "Failed to get panel-reset-gpios\n"); in sony_td4353_jdi_probe()
258 ctx->touch_reset_gpio = devm_gpiod_get(dev, "touch-reset", GPIOD_ASIS); in sony_td4353_jdi_probe()
259 if (IS_ERR(ctx->touch_reset_gpio)) in sony_td4353_jdi_probe()
260 return dev_err_probe(dev, PTR_ERR(ctx->touch_reset_gpio), in sony_td4353_jdi_probe()
261 "Failed to get touch-reset-gpios\n"); in sony_td4353_jdi_probe()
263 ctx->dsi = dsi; in sony_td4353_jdi_probe()
266 dsi->lanes = 4; in sony_td4353_jdi_probe()
267 dsi->format = MIPI_DSI_FMT_RGB888; in sony_td4353_jdi_probe()
268 dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS; in sony_td4353_jdi_probe()
270 drm_panel_init(&ctx->panel, dev, &sony_td4353_jdi_panel_funcs, in sony_td4353_jdi_probe()
273 ret = drm_panel_of_backlight(&ctx->panel); in sony_td4353_jdi_probe()
277 drm_panel_add(&ctx->panel); in sony_td4353_jdi_probe()
282 drm_panel_remove(&ctx->panel); in sony_td4353_jdi_probe()
296 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in sony_td4353_jdi_remove()
298 drm_panel_remove(&ctx->panel); in sony_td4353_jdi_remove()
302 { .compatible = "sony,td4353-jdi-tama", .data = (void *)TYPE_TAMA_60HZ },
311 .name = "panel-sony-td4353-jdi",