Lines Matching full:sharp
35 static void sharp_wait_frames(struct sharp_panel *sharp, unsigned int frames) in sharp_wait_frames() argument
37 unsigned int refresh = drm_mode_vrefresh(sharp->mode); in sharp_wait_frames()
45 static int sharp_panel_write(struct sharp_panel *sharp, u16 offset, u8 value) in sharp_panel_write() argument
48 struct mipi_dsi_device *dsi = sharp->link1; in sharp_panel_write()
69 static __maybe_unused int sharp_panel_read(struct sharp_panel *sharp, in sharp_panel_read() argument
76 err = mipi_dsi_generic_read(sharp->link1, &offset, sizeof(offset), in sharp_panel_read()
79 dev_err(&sharp->link1->dev, "failed to read from %04x: %zd\n", in sharp_panel_read()
87 struct sharp_panel *sharp = to_sharp_panel(panel); in sharp_panel_unprepare() local
90 sharp_wait_frames(sharp, 4); in sharp_panel_unprepare()
92 err = mipi_dsi_dcs_set_display_off(sharp->link1); in sharp_panel_unprepare()
96 err = mipi_dsi_dcs_enter_sleep_mode(sharp->link1); in sharp_panel_unprepare()
102 regulator_disable(sharp->supply); in sharp_panel_unprepare()
143 struct sharp_panel *sharp = to_sharp_panel(panel); in sharp_panel_prepare() local
147 err = regulator_enable(sharp->supply); in sharp_panel_prepare()
159 err = mipi_dsi_dcs_exit_sleep_mode(sharp->link1); in sharp_panel_prepare()
175 err = sharp_panel_write(sharp, 0x1000, 0x2a); in sharp_panel_prepare()
182 err = sharp_panel_write(sharp, 0x1001, 0x01); in sharp_panel_prepare()
188 err = mipi_dsi_dcs_set_pixel_format(sharp->link1, format); in sharp_panel_prepare()
201 err = sharp_setup_symmetrical_split(sharp->link1, sharp->link2, in sharp_panel_prepare()
202 sharp->mode); in sharp_panel_prepare()
209 err = mipi_dsi_dcs_set_display_on(sharp->link1); in sharp_panel_prepare()
216 sharp_wait_frames(sharp, 6); in sharp_panel_prepare()
221 regulator_disable(sharp->supply); in sharp_panel_prepare()
267 { .compatible = "sharp,lq101r1sx01", },
272 static int sharp_panel_add(struct sharp_panel *sharp) in sharp_panel_add() argument
276 sharp->mode = &default_mode; in sharp_panel_add()
278 sharp->supply = devm_regulator_get(&sharp->link1->dev, "power"); in sharp_panel_add()
279 if (IS_ERR(sharp->supply)) in sharp_panel_add()
280 return PTR_ERR(sharp->supply); in sharp_panel_add()
282 drm_panel_init(&sharp->base, &sharp->link1->dev, &sharp_panel_funcs, in sharp_panel_add()
285 ret = drm_panel_of_backlight(&sharp->base); in sharp_panel_add()
289 drm_panel_add(&sharp->base); in sharp_panel_add()
294 static void sharp_panel_del(struct sharp_panel *sharp) in sharp_panel_del() argument
296 if (sharp->base.dev) in sharp_panel_del()
297 drm_panel_remove(&sharp->base); in sharp_panel_del()
299 if (sharp->link2) in sharp_panel_del()
300 put_device(&sharp->link2->dev); in sharp_panel_del()
306 struct sharp_panel *sharp; in sharp_panel_probe() local
326 sharp = devm_kzalloc(&dsi->dev, sizeof(*sharp), GFP_KERNEL); in sharp_panel_probe()
327 if (!sharp) { in sharp_panel_probe()
332 mipi_dsi_set_drvdata(dsi, sharp); in sharp_panel_probe()
334 sharp->link2 = secondary; in sharp_panel_probe()
335 sharp->link1 = dsi; in sharp_panel_probe()
337 err = sharp_panel_add(sharp); in sharp_panel_probe()
347 sharp_panel_del(sharp); in sharp_panel_probe()
357 struct sharp_panel *sharp = mipi_dsi_get_drvdata(dsi); in sharp_panel_remove() local
365 if (sharp) in sharp_panel_remove()
366 sharp_panel_del(sharp); in sharp_panel_remove()
371 .name = "panel-sharp-lq101r1sx01",
380 MODULE_DESCRIPTION("Sharp LQ101R1SX01 panel driver");