Lines Matching refs:pinfo

87 	struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);  in nt36672a_send_cmds()  local
94 err = mipi_dsi_dcs_write(pinfo->link, cmd->data[0], cmd->data + 1, 1); in nt36672a_send_cmds()
105 struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); in nt36672a_panel_power_off() local
108 gpiod_set_value(pinfo->reset_gpio, 1); in nt36672a_panel_power_off()
110 ret = regulator_bulk_disable(ARRAY_SIZE(pinfo->supplies), pinfo->supplies); in nt36672a_panel_power_off()
119 struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); in nt36672a_panel_unprepare() local
122 if (!pinfo->prepared) in nt36672a_panel_unprepare()
126 ret = nt36672a_send_cmds(panel, pinfo->desc->off_cmds, in nt36672a_panel_unprepare()
127 pinfo->desc->num_off_cmds); in nt36672a_panel_unprepare()
132 ret = mipi_dsi_dcs_set_display_off(pinfo->link); in nt36672a_panel_unprepare()
139 ret = mipi_dsi_dcs_enter_sleep_mode(pinfo->link); in nt36672a_panel_unprepare()
150 pinfo->prepared = false; in nt36672a_panel_unprepare()
155 static int nt36672a_panel_power_on(struct nt36672a_panel *pinfo) in nt36672a_panel_power_on() argument
159 ret = regulator_bulk_enable(ARRAY_SIZE(pinfo->supplies), pinfo->supplies); in nt36672a_panel_power_on()
169 gpiod_set_value(pinfo->reset_gpio, 1); in nt36672a_panel_power_on()
171 gpiod_set_value(pinfo->reset_gpio, 0); in nt36672a_panel_power_on()
179 struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); in nt36672a_panel_prepare() local
182 if (pinfo->prepared) in nt36672a_panel_prepare()
185 err = nt36672a_panel_power_on(pinfo); in nt36672a_panel_prepare()
190 err = nt36672a_send_cmds(panel, pinfo->desc->on_cmds_1, in nt36672a_panel_prepare()
191 pinfo->desc->num_on_cmds_1); in nt36672a_panel_prepare()
198 err = mipi_dsi_dcs_exit_sleep_mode(pinfo->link); in nt36672a_panel_prepare()
207 err = mipi_dsi_dcs_set_display_on(pinfo->link); in nt36672a_panel_prepare()
214 err = nt36672a_send_cmds(panel, pinfo->desc->on_cmds_2, in nt36672a_panel_prepare()
215 pinfo->desc->num_on_cmds_2); in nt36672a_panel_prepare()
224 pinfo->prepared = true; in nt36672a_panel_prepare()
229 gpiod_set_value(pinfo->reset_gpio, 0); in nt36672a_panel_prepare()
236 struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); in nt36672a_panel_get_modes() local
237 const struct drm_display_mode *m = pinfo->desc->display_mode; in nt36672a_panel_get_modes()
247 connector->display_info.width_mm = pinfo->desc->width_mm; in nt36672a_panel_get_modes()
248 connector->display_info.height_mm = pinfo->desc->height_mm; in nt36672a_panel_get_modes()
603 static int nt36672a_panel_add(struct nt36672a_panel *pinfo) in nt36672a_panel_add() argument
605 struct device *dev = &pinfo->link->dev; in nt36672a_panel_add()
608 for (i = 0; i < ARRAY_SIZE(pinfo->supplies); i++) in nt36672a_panel_add()
609 pinfo->supplies[i].supply = nt36672a_regulator_names[i]; in nt36672a_panel_add()
611 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(pinfo->supplies), in nt36672a_panel_add()
612 pinfo->supplies); in nt36672a_panel_add()
616 for (i = 0; i < ARRAY_SIZE(pinfo->supplies); i++) { in nt36672a_panel_add()
617 ret = regulator_set_load(pinfo->supplies[i].consumer, in nt36672a_panel_add()
623 pinfo->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in nt36672a_panel_add()
624 if (IS_ERR(pinfo->reset_gpio)) in nt36672a_panel_add()
625 return dev_err_probe(dev, PTR_ERR(pinfo->reset_gpio), in nt36672a_panel_add()
628 drm_panel_init(&pinfo->base, dev, &panel_funcs, DRM_MODE_CONNECTOR_DSI); in nt36672a_panel_add()
630 ret = drm_panel_of_backlight(&pinfo->base); in nt36672a_panel_add()
634 drm_panel_add(&pinfo->base); in nt36672a_panel_add()
641 struct nt36672a_panel *pinfo; in nt36672a_panel_probe() local
645 pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL); in nt36672a_panel_probe()
646 if (!pinfo) in nt36672a_panel_probe()
653 pinfo->desc = desc; in nt36672a_panel_probe()
654 pinfo->link = dsi; in nt36672a_panel_probe()
656 mipi_dsi_set_drvdata(dsi, pinfo); in nt36672a_panel_probe()
658 err = nt36672a_panel_add(pinfo); in nt36672a_panel_probe()
664 drm_panel_remove(&pinfo->base); in nt36672a_panel_probe()
673 struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi); in nt36672a_panel_remove() local
676 err = drm_panel_unprepare(&pinfo->base); in nt36672a_panel_remove()
680 err = drm_panel_disable(&pinfo->base); in nt36672a_panel_remove()
688 drm_panel_remove(&pinfo->base); in nt36672a_panel_remove()
693 struct nt36672a_panel *pinfo = mipi_dsi_get_drvdata(dsi); in nt36672a_panel_shutdown() local
695 drm_panel_disable(&pinfo->base); in nt36672a_panel_shutdown()
696 drm_panel_unprepare(&pinfo->base); in nt36672a_panel_shutdown()