Lines Matching refs:innolux

66 	struct innolux_panel *innolux = to_innolux_panel(panel);  in innolux_panel_disable()  local
68 if (!innolux->enabled) in innolux_panel_disable()
71 innolux->enabled = false; in innolux_panel_disable()
78 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_unprepare() local
81 if (!innolux->prepared) in innolux_panel_unprepare()
84 err = mipi_dsi_dcs_set_display_off(innolux->link); in innolux_panel_unprepare()
88 err = mipi_dsi_dcs_enter_sleep_mode(innolux->link); in innolux_panel_unprepare()
94 if (innolux->desc->sleep_mode_delay) in innolux_panel_unprepare()
95 msleep(innolux->desc->sleep_mode_delay); in innolux_panel_unprepare()
97 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_unprepare()
99 if (innolux->desc->power_down_delay) in innolux_panel_unprepare()
100 msleep(innolux->desc->power_down_delay); in innolux_panel_unprepare()
102 err = regulator_bulk_disable(innolux->desc->num_supplies, in innolux_panel_unprepare()
103 innolux->supplies); in innolux_panel_unprepare()
107 innolux->prepared = false; in innolux_panel_unprepare()
114 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_prepare() local
117 if (innolux->prepared) in innolux_panel_prepare()
120 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_prepare()
122 err = regulator_bulk_enable(innolux->desc->num_supplies, in innolux_panel_prepare()
123 innolux->supplies); in innolux_panel_prepare()
130 gpiod_set_value_cansleep(innolux->enable_gpio, 1); in innolux_panel_prepare()
135 if (innolux->desc->init_cmds) { in innolux_panel_prepare()
137 innolux->desc->init_cmds; in innolux_panel_prepare()
143 err = mipi_dsi_generic_write(innolux->link, cmd->data, in innolux_panel_prepare()
155 err = mipi_dsi_dcs_nop(innolux->link); in innolux_panel_prepare()
163 err = mipi_dsi_dcs_exit_sleep_mode(innolux->link); in innolux_panel_prepare()
172 err = mipi_dsi_dcs_set_display_on(innolux->link); in innolux_panel_prepare()
181 innolux->prepared = true; in innolux_panel_prepare()
186 gpiod_set_value_cansleep(innolux->enable_gpio, 0); in innolux_panel_prepare()
187 regulator_bulk_disable(innolux->desc->num_supplies, innolux->supplies); in innolux_panel_prepare()
194 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_enable() local
196 if (innolux->enabled) in innolux_panel_enable()
199 innolux->enabled = true; in innolux_panel_enable()
387 struct innolux_panel *innolux = to_innolux_panel(panel); in innolux_panel_get_modes() local
388 const struct drm_display_mode *m = innolux->desc->mode; in innolux_panel_get_modes()
402 connector->display_info.width_mm = innolux->desc->size.width; in innolux_panel_get_modes()
403 connector->display_info.height_mm = innolux->desc->size.height; in innolux_panel_get_modes()
404 connector->display_info.bpc = innolux->desc->bpc; in innolux_panel_get_modes()
431 struct innolux_panel *innolux; in innolux_panel_add() local
435 innolux = devm_kzalloc(dev, sizeof(*innolux), GFP_KERNEL); in innolux_panel_add()
436 if (!innolux) in innolux_panel_add()
439 innolux->desc = desc; in innolux_panel_add()
441 innolux->supplies = devm_kcalloc(dev, desc->num_supplies, in innolux_panel_add()
442 sizeof(*innolux->supplies), in innolux_panel_add()
444 if (!innolux->supplies) in innolux_panel_add()
448 innolux->supplies[i].supply = desc->supply_names[i]; in innolux_panel_add()
451 innolux->supplies); in innolux_panel_add()
455 innolux->enable_gpio = devm_gpiod_get_optional(dev, "enable", in innolux_panel_add()
457 if (IS_ERR(innolux->enable_gpio)) { in innolux_panel_add()
458 err = PTR_ERR(innolux->enable_gpio); in innolux_panel_add()
460 innolux->enable_gpio = NULL; in innolux_panel_add()
463 drm_panel_init(&innolux->base, dev, &innolux_panel_funcs, in innolux_panel_add()
466 err = drm_panel_of_backlight(&innolux->base); in innolux_panel_add()
470 drm_panel_add(&innolux->base); in innolux_panel_add()
472 mipi_dsi_set_drvdata(dsi, innolux); in innolux_panel_add()
473 innolux->link = dsi; in innolux_panel_add()
478 static void innolux_panel_del(struct innolux_panel *innolux) in innolux_panel_del() argument
480 drm_panel_remove(&innolux->base); in innolux_panel_del()
486 struct innolux_panel *innolux; in innolux_panel_probe() local
500 innolux = mipi_dsi_get_drvdata(dsi); in innolux_panel_probe()
501 innolux_panel_del(innolux); in innolux_panel_probe()
510 struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi); in innolux_panel_remove() local
513 err = drm_panel_unprepare(&innolux->base); in innolux_panel_remove()
517 err = drm_panel_disable(&innolux->base); in innolux_panel_remove()
525 innolux_panel_del(innolux); in innolux_panel_remove()
530 struct innolux_panel *innolux = mipi_dsi_get_drvdata(dsi); in innolux_panel_shutdown() local
532 drm_panel_unprepare(&innolux->base); in innolux_panel_shutdown()
533 drm_panel_disable(&innolux->base); in innolux_panel_shutdown()