Lines Matching refs:innolux

67 	struct innolux_panel *innolux = to_innolux_panel(panel);  in innolux_panel_disable()  local
69 if (!innolux->enabled) in innolux_panel_disable()
72 innolux->enabled = false; in innolux_panel_disable()
79 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_unprepare() local
82 if (!innolux->prepared) in innolux_panel_unprepare()
85 err = mipi_dsi_dcs_set_display_off(innolux->link); in innolux_panel_unprepare()
89 err = mipi_dsi_dcs_enter_sleep_mode(innolux->link); in innolux_panel_unprepare()
95 if (innolux->desc->sleep_mode_delay) in innolux_panel_unprepare()
96 msleep(innolux->desc->sleep_mode_delay); in innolux_panel_unprepare()
98 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_unprepare()
100 if (innolux->desc->power_down_delay) in innolux_panel_unprepare()
101 msleep(innolux->desc->power_down_delay); in innolux_panel_unprepare()
103 err = regulator_bulk_disable(innolux->desc->num_supplies, in innolux_panel_unprepare()
104 innolux->supplies); in innolux_panel_unprepare()
108 innolux->prepared = false; in innolux_panel_unprepare()
115 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_prepare() local
118 if (innolux->prepared) in innolux_panel_prepare()
121 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_prepare()
123 err = regulator_bulk_enable(innolux->desc->num_supplies, in innolux_panel_prepare()
124 innolux->supplies); in innolux_panel_prepare()
131 gpiod_set_value_cansleep(innolux->enable_gpio, 1); in innolux_panel_prepare()
136 if (innolux->desc->init_cmds) { in innolux_panel_prepare()
138 innolux->desc->init_cmds; in innolux_panel_prepare()
144 err = mipi_dsi_generic_write(innolux->link, cmd->data, in innolux_panel_prepare()
156 err = mipi_dsi_dcs_nop(innolux->link); in innolux_panel_prepare()
164 err = mipi_dsi_dcs_exit_sleep_mode(innolux->link); in innolux_panel_prepare()
173 err = mipi_dsi_dcs_set_display_on(innolux->link); in innolux_panel_prepare()
182 innolux->prepared = true; in innolux_panel_prepare()
187 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_prepare()
188 regulator_bulk_disable(innolux->desc->num_supplies, innolux->supplies); in innolux_panel_prepare()
195 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_enable() local
197 if (innolux->enabled) in innolux_panel_enable()
200 innolux->enabled = true; in innolux_panel_enable()
388 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_get_modes() local
389 const struct drm_display_mode *m = innolux->desc->mode; in innolux_panel_get_modes()
403 connector->display_info.width_mm = innolux->desc->size.width; in innolux_panel_get_modes()
404 connector->display_info.height_mm = innolux->desc->size.height; in innolux_panel_get_modes()
405 connector->display_info.bpc = innolux->desc->bpc; in innolux_panel_get_modes()
432 struct innolux_panel *innolux; in innolux_panel_add() local
436 innolux = devm_kzalloc(dev, sizeof(*innolux), GFP_KERNEL); in innolux_panel_add()
437 if (!innolux) in innolux_panel_add()
440 innolux->desc = desc; in innolux_panel_add()
442 innolux->supplies = devm_kcalloc(dev, desc->num_supplies, in innolux_panel_add()
443 sizeof(*innolux->supplies), in innolux_panel_add()
445 if (!innolux->supplies) in innolux_panel_add()
449 innolux->supplies[i].supply = desc->supply_names[i]; in innolux_panel_add()
452 innolux->supplies); in innolux_panel_add()
456 innolux->enable_gpio = devm_gpiod_get_optional(dev, "enable", in innolux_panel_add()
458 if (IS_ERR(innolux->enable_gpio)) { in innolux_panel_add()
459 err = PTR_ERR(innolux->enable_gpio); in innolux_panel_add()
461 innolux->enable_gpio = NULL; in innolux_panel_add()
464 drm_panel_init(&innolux->base, dev, &innolux_panel_funcs, in innolux_panel_add()
467 err = drm_panel_of_backlight(&innolux->base); in innolux_panel_add()
471 drm_panel_add(&innolux->base); in innolux_panel_add()
473 mipi_dsi_set_drvdata(dsi, innolux); in innolux_panel_add()
474 innolux->link = dsi; in innolux_panel_add()
479 static void innolux_panel_del(struct innolux_panel *innolux) in innolux_panel_del() argument
481 drm_panel_remove(&innolux->base); in innolux_panel_del()
487 struct innolux_panel *innolux; in innolux_panel_probe() local
501 innolux = mipi_dsi_get_drvdata(dsi); in innolux_panel_probe()
502 innolux_panel_del(innolux); in innolux_panel_probe()
511 struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi); in innolux_panel_remove() local
514 err = drm_panel_unprepare(&innolux->base); in innolux_panel_remove()
518 err = drm_panel_disable(&innolux->base); in innolux_panel_remove()
526 innolux_panel_del(innolux); in innolux_panel_remove()
533 struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi); in innolux_panel_shutdown() local
535 drm_panel_unprepare(&innolux->base); in innolux_panel_shutdown()
536 drm_panel_disable(&innolux->base); in innolux_panel_shutdown()