Lines Matching refs:wuxga_nt
45 static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt) in wuxga_nt_panel_on() argument
47 return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi); in wuxga_nt_panel_on()
52 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_disable() local
54 return mipi_dsi_shutdown_peripheral(wuxga_nt->dsi); in wuxga_nt_panel_disable()
59 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_unprepare() local
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()
69 struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel); in wuxga_nt_panel_prepare() local
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()
96 ret = wuxga_nt_panel_on(wuxga_nt); in wuxga_nt_panel_prepare()
105 regulator_disable(wuxga_nt->supply); in wuxga_nt_panel_prepare()
158 static int wuxga_nt_panel_add(struct wuxga_nt_panel *wuxga_nt) in wuxga_nt_panel_add() argument
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()
181 static void wuxga_nt_panel_del(struct wuxga_nt_panel *wuxga_nt) in wuxga_nt_panel_del() argument
183 if (wuxga_nt->base.dev) in wuxga_nt_panel_del()
184 drm_panel_remove(&wuxga_nt->base); in wuxga_nt_panel_del()
189 struct wuxga_nt_panel *wuxga_nt; in wuxga_nt_panel_probe() local
199 wuxga_nt = devm_kzalloc(&dsi->dev, sizeof(*wuxga_nt), GFP_KERNEL); in wuxga_nt_panel_probe()
200 if (!wuxga_nt) in wuxga_nt_panel_probe()
203 mipi_dsi_set_drvdata(dsi, wuxga_nt); in wuxga_nt_panel_probe()
205 wuxga_nt->dsi = dsi; in wuxga_nt_panel_probe()
207 ret = wuxga_nt_panel_add(wuxga_nt); in wuxga_nt_panel_probe()
213 wuxga_nt_panel_del(wuxga_nt); in wuxga_nt_panel_probe()
222 struct wuxga_nt_panel *wuxga_nt = mipi_dsi_get_drvdata(dsi); in wuxga_nt_panel_remove() local
229 wuxga_nt_panel_del(wuxga_nt); in wuxga_nt_panel_remove()