Lines Matching +full:power +full:- +full:up +full:- +full:delay +full:- +full:ms
1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <linux/delay.h>
23 * When power is turned off to this panel a minimum off time of 500ms has to be
25 * track of earliest wakeup time and delay subsequent prepare call accordingly
47 return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi); in wuxga_nt_panel_on()
54 return mipi_dsi_shutdown_peripheral(wuxga_nt->dsi); in wuxga_nt_panel_disable()
61 regulator_disable(wuxga_nt->supply); in wuxga_nt_panel_unprepare()
62 wuxga_nt->earliest_wake = ktime_add_ms(ktime_get_real(), MIN_POFF_MS); in wuxga_nt_panel_unprepare()
74 * If the user re-enabled the panel before the required off-time then in wuxga_nt_panel_prepare()
75 * we need to wait the remaining period before re-enabling regulator in wuxga_nt_panel_prepare()
77 enablewait = ktime_ms_delta(wuxga_nt->earliest_wake, ktime_get_real()); in wuxga_nt_panel_prepare()
86 ret = regulator_enable(wuxga_nt->supply); in wuxga_nt_panel_prepare()
91 * A minimum delay of 250ms is required after power-up until commands in wuxga_nt_panel_prepare()
98 dev_err(panel->dev, "failed to set panel on: %d\n", ret); in wuxga_nt_panel_prepare()
105 regulator_disable(wuxga_nt->supply); in wuxga_nt_panel_prepare()
127 mode = drm_mode_duplicate(connector->dev, &default_mode); in wuxga_nt_panel_get_modes()
129 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in wuxga_nt_panel_get_modes()
132 return -ENOMEM; in wuxga_nt_panel_get_modes()
139 connector->display_info.width_mm = 217; in wuxga_nt_panel_get_modes()
140 connector->display_info.height_mm = 136; in wuxga_nt_panel_get_modes()
160 struct device *dev = &wuxga_nt->dsi->dev; in wuxga_nt_panel_add()
163 wuxga_nt->mode = &default_mode; in wuxga_nt_panel_add()
165 wuxga_nt->supply = devm_regulator_get(dev, "power"); in wuxga_nt_panel_add()
166 if (IS_ERR(wuxga_nt->supply)) in wuxga_nt_panel_add()
167 return PTR_ERR(wuxga_nt->supply); in wuxga_nt_panel_add()
169 drm_panel_init(&wuxga_nt->base, &wuxga_nt->dsi->dev, in wuxga_nt_panel_add()
172 ret = drm_panel_of_backlight(&wuxga_nt->base); in wuxga_nt_panel_add()
176 drm_panel_add(&wuxga_nt->base); in wuxga_nt_panel_add()
183 if (wuxga_nt->base.dev) in wuxga_nt_panel_del()
184 drm_panel_remove(&wuxga_nt->base); in wuxga_nt_panel_del()
192 dsi->lanes = 4; in wuxga_nt_panel_probe()
193 dsi->format = MIPI_DSI_FMT_RGB888; in wuxga_nt_panel_probe()
194 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | in wuxga_nt_panel_probe()
199 wuxga_nt = devm_kzalloc(&dsi->dev, sizeof(*wuxga_nt), GFP_KERNEL); in wuxga_nt_panel_probe()
201 return -ENOMEM; in wuxga_nt_panel_probe()
205 wuxga_nt->dsi = dsi; in wuxga_nt_panel_probe()
227 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); in wuxga_nt_panel_remove()
234 .name = "panel-panasonic-vvx10f034n00",
243 MODULE_DESCRIPTION("Panasonic VVX10F034N00 Novatek NT1397-based WUXGA (1920x1200) video mode panel …