Lines Matching +full:s6e88a0 +full:- +full:ams452ef01
1 // SPDX-License-Identifier: GPL-2.0-only
41 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in s6e88a0_ams452ef01_reset()
43 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in s6e88a0_ams452ef01_reset()
45 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in s6e88a0_ams452ef01_reset()
51 struct mipi_dsi_device *dsi = ctx->dsi; in s6e88a0_ams452ef01_on()
52 struct device *dev = &dsi->dev; in s6e88a0_ams452ef01_on()
55 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in s6e88a0_ams452ef01_on()
97 struct mipi_dsi_device *dsi = ctx->dsi; in s6e88a0_ams452ef01_off()
98 struct device *dev = &dsi->dev; in s6e88a0_ams452ef01_off()
101 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in s6e88a0_ams452ef01_off()
123 struct device *dev = &ctx->dsi->dev; in s6e88a0_ams452ef01_prepare()
126 if (ctx->prepared) in s6e88a0_ams452ef01_prepare()
129 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in s6e88a0_ams452ef01_prepare()
140 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in s6e88a0_ams452ef01_prepare()
141 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), in s6e88a0_ams452ef01_prepare()
142 ctx->supplies); in s6e88a0_ams452ef01_prepare()
146 ctx->prepared = true; in s6e88a0_ams452ef01_prepare()
153 struct device *dev = &ctx->dsi->dev; in s6e88a0_ams452ef01_unprepare()
156 if (!ctx->prepared) in s6e88a0_ams452ef01_unprepare()
161 dev_err(dev, "Failed to un-initialize panel: %d\n", ret); in s6e88a0_ams452ef01_unprepare()
163 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in s6e88a0_ams452ef01_unprepare()
164 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in s6e88a0_ams452ef01_unprepare()
166 ctx->prepared = false; in s6e88a0_ams452ef01_unprepare()
189 mode = drm_mode_duplicate(connector->dev, &s6e88a0_ams452ef01_mode); in s6e88a0_ams452ef01_get_modes()
191 return -ENOMEM; in s6e88a0_ams452ef01_get_modes()
195 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in s6e88a0_ams452ef01_get_modes()
196 connector->display_info.width_mm = mode->width_mm; in s6e88a0_ams452ef01_get_modes()
197 connector->display_info.height_mm = mode->height_mm; in s6e88a0_ams452ef01_get_modes()
211 struct device *dev = &dsi->dev; in s6e88a0_ams452ef01_probe()
217 return -ENOMEM; in s6e88a0_ams452ef01_probe()
219 ctx->supplies[0].supply = "vdd3"; in s6e88a0_ams452ef01_probe()
220 ctx->supplies[1].supply = "vci"; in s6e88a0_ams452ef01_probe()
221 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in s6e88a0_ams452ef01_probe()
222 ctx->supplies); in s6e88a0_ams452ef01_probe()
228 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in s6e88a0_ams452ef01_probe()
229 if (IS_ERR(ctx->reset_gpio)) { in s6e88a0_ams452ef01_probe()
230 ret = PTR_ERR(ctx->reset_gpio); in s6e88a0_ams452ef01_probe()
231 dev_err(dev, "Failed to get reset-gpios: %d\n", ret); in s6e88a0_ams452ef01_probe()
235 ctx->dsi = dsi; in s6e88a0_ams452ef01_probe()
238 dsi->lanes = 2; in s6e88a0_ams452ef01_probe()
239 dsi->format = MIPI_DSI_FMT_RGB888; in s6e88a0_ams452ef01_probe()
240 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST; in s6e88a0_ams452ef01_probe()
242 drm_panel_init(&ctx->panel, dev, &s6e88a0_ams452ef01_panel_funcs, in s6e88a0_ams452ef01_probe()
245 drm_panel_add(&ctx->panel); in s6e88a0_ams452ef01_probe()
263 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in s6e88a0_ams452ef01_remove()
265 drm_panel_remove(&ctx->panel); in s6e88a0_ams452ef01_remove()
271 { .compatible = "samsung,s6e88a0-ams452ef01" },
280 .name = "panel-s6e88a0-ams452ef01",
287 MODULE_DESCRIPTION("MIPI-DSI based Panel Driver for AMS452EF01 AMOLED LCD with a S6E88A0 controller…