Lines Matching refs:wuxga_nt
48 static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt) in wuxga_nt_panel_on() argument
50 return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi); in wuxga_nt_panel_on()
55 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_disable() local
58 if (!wuxga_nt->enabled) in wuxga_nt_panel_disable()
61 mipi_ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi); in wuxga_nt_panel_disable()
63 wuxga_nt->enabled = false; in wuxga_nt_panel_disable()
70 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_unprepare() local
72 if (!wuxga_nt->prepared) in wuxga_nt_panel_unprepare()
75 regulator_disable(wuxga_nt->supply); in wuxga_nt_panel_unprepare()
76 wuxga_nt->earliest_wake = ktime_add_ms(ktime_get_real(), MIN_POFF_MS); in wuxga_nt_panel_unprepare()
77 wuxga_nt->prepared = false; in wuxga_nt_panel_unprepare()
84 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_prepare() local
88 if (wuxga_nt->prepared) in wuxga_nt_panel_prepare()
95 enablewait = ktime_ms_delta(wuxga_nt->earliest_wake, ktime_get_real()); in wuxga_nt_panel_prepare()
104 ret = regulator_enable(wuxga_nt->supply); in wuxga_nt_panel_prepare()
114 ret = wuxga_nt_panel_on(wuxga_nt); in wuxga_nt_panel_prepare()
120 wuxga_nt->prepared = true; in wuxga_nt_panel_prepare()
125 regulator_disable(wuxga_nt->supply); in wuxga_nt_panel_prepare()
132 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_enable() local
134 if (wuxga_nt->enabled) in wuxga_nt_panel_enable()
137 wuxga_nt->enabled = true; in wuxga_nt_panel_enable()
191 static int wuxga_nt_panel_add(struct wuxga_nt_panel *wuxga_nt) in wuxga_nt_panel_add() argument
193 struct device *dev = &wuxga_nt->dsi->dev; in wuxga_nt_panel_add()
196 wuxga_nt->mode = &default_mode; in wuxga_nt_panel_add()
198 wuxga_nt->supply = devm_regulator_get(dev, "power"); in wuxga_nt_panel_add()
199 if (IS_ERR(wuxga_nt->supply)) in wuxga_nt_panel_add()
200 return PTR_ERR(wuxga_nt->supply); in wuxga_nt_panel_add()
202 drm_panel_init(&wuxga_nt->base, &wuxga_nt->dsi->dev, in wuxga_nt_panel_add()
205 ret = drm_panel_of_backlight(&wuxga_nt->base); in wuxga_nt_panel_add()
209 drm_panel_add(&wuxga_nt->base); in wuxga_nt_panel_add()
214 static void wuxga_nt_panel_del(struct wuxga_nt_panel *wuxga_nt) in wuxga_nt_panel_del() argument
216 if (wuxga_nt->base.dev) in wuxga_nt_panel_del()
217 drm_panel_remove(&wuxga_nt->base); in wuxga_nt_panel_del()
222 struct wuxga_nt_panel *wuxga_nt; in wuxga_nt_panel_probe() local
232 wuxga_nt = devm_kzalloc(&dsi->dev, sizeof(*wuxga_nt), GFP_KERNEL); in wuxga_nt_panel_probe()
233 if (!wuxga_nt) in wuxga_nt_panel_probe()
236 mipi_dsi_set_drvdata(dsi, wuxga_nt); in wuxga_nt_panel_probe()
238 wuxga_nt->dsi = dsi; in wuxga_nt_panel_probe()
240 ret = wuxga_nt_panel_add(wuxga_nt); in wuxga_nt_panel_probe()
246 wuxga_nt_panel_del(wuxga_nt); in wuxga_nt_panel_probe()
255 struct wuxga_nt_panel *wuxga_nt = mipi_dsi_get_drvdata(dsi); in wuxga_nt_panel_remove() local
258 ret = drm_panel_disable(&wuxga_nt->base); in wuxga_nt_panel_remove()
266 wuxga_nt_panel_del(wuxga_nt); in wuxga_nt_panel_remove()
271 struct wuxga_nt_panel *wuxga_nt = mipi_dsi_get_drvdata(dsi); in wuxga_nt_panel_shutdown() local
273 drm_panel_disable(&wuxga_nt->base); in wuxga_nt_panel_shutdown()