Lines Matching +full:regulator +full:- +full:poweroff

1 // SPDX-License-Identifier: GPL-2.0-only
13 #include <linux/regulator/consumer.h>
33 struct regulator *supply;
47 return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
54 return mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
61 regulator_disable(wuxga_nt->supply);
62 wuxga_nt->earliest_wake = ktime_add_ms(ktime_get_real(), MIN_POFF_MS);
74 * If the user re-enabled the panel before the required off-time then
75 * we need to wait the remaining period before re-enabling regulator
77 enablewait = ktime_ms_delta(wuxga_nt->earliest_wake, ktime_get_real());
86 ret = regulator_enable(wuxga_nt->supply);
91 * A minimum delay of 250ms is required after power-up until commands
98 dev_err(panel->dev, "failed to set panel on: %d\n", ret);
99 goto poweroff;
104 poweroff:
105 regulator_disable(wuxga_nt->supply);
127 mode = drm_mode_duplicate(connector->dev, &default_mode);
129 dev_err(panel->dev, "failed to add mode %ux%u@%u\n",
132 return -ENOMEM;
139 connector->display_info.width_mm = 217;
140 connector->display_info.height_mm = 136;
160 struct device *dev = &wuxga_nt->dsi->dev;
163 wuxga_nt->mode = &default_mode;
165 wuxga_nt->supply = devm_regulator_get(dev, "power");
166 if (IS_ERR(wuxga_nt->supply))
167 return PTR_ERR(wuxga_nt->supply);
169 ret = drm_panel_of_backlight(&wuxga_nt->base);
173 drm_panel_add(&wuxga_nt->base);
180 if (wuxga_nt->base.dev)
181 drm_panel_remove(&wuxga_nt->base);
189 dsi->lanes = 4;
190 dsi->format = MIPI_DSI_FMT_RGB888;
191 dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
196 wuxga_nt = devm_drm_panel_alloc(&dsi->dev, __typeof(*wuxga_nt), base,
205 wuxga_nt->dsi = dsi;
227 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
234 .name = "panel-panasonic-vvx10f034n00",
243 MODULE_DESCRIPTION("Panasonic VVX10F034N00 Novatek NT1397-based WUXGA (1920x1200) video mode panel driver");