Lines Matching refs:pinfo

57 static void disable_gpios(struct panel_info *pinfo)  in disable_gpios()  argument
59 gpiod_set_value(pinfo->enable_gpio, 0); in disable_gpios()
60 gpiod_set_value(pinfo->pp33_gpio, 0); in disable_gpios()
61 gpiod_set_value(pinfo->pp18_gpio, 0); in disable_gpios()
66 struct panel_info *pinfo = to_panel_info(panel); in send_mipi_cmds() local
70 for (i = 0; i < pinfo->desc->on_cmds_num; i++) { in send_mipi_cmds()
71 err = mipi_dsi_dcs_write_buffer(pinfo->link, &cmds[i], in send_mipi_cmds()
83 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_disable() local
86 err = mipi_dsi_dcs_set_display_off(pinfo->link); in boe_panel_disable()
97 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_unprepare() local
100 err = mipi_dsi_dcs_set_display_off(pinfo->link); in boe_panel_unprepare()
104 err = mipi_dsi_dcs_enter_sleep_mode(pinfo->link); in boe_panel_unprepare()
111 disable_gpios(pinfo); in boe_panel_unprepare()
118 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_prepare() local
121 gpiod_set_value(pinfo->pp18_gpio, 1); in boe_panel_prepare()
124 gpiod_set_value(pinfo->pp33_gpio, 1); in boe_panel_prepare()
129 gpiod_set_value(pinfo->enable_gpio, 1); in boe_panel_prepare()
133 gpiod_set_value(pinfo->enable_gpio, 0); in boe_panel_prepare()
137 gpiod_set_value(pinfo->enable_gpio, 1); in boe_panel_prepare()
143 err = send_mipi_cmds(panel, pinfo->desc->on_cmds); in boe_panel_prepare()
149 err = mipi_dsi_dcs_exit_sleep_mode(pinfo->link); in boe_panel_prepare()
158 err = mipi_dsi_dcs_set_display_on(pinfo->link); in boe_panel_prepare()
170 disable_gpios(pinfo); in boe_panel_prepare()
176 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_enable() local
181 ret = mipi_dsi_dcs_set_display_on(pinfo->link); in boe_panel_enable()
193 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_get_modes() local
194 const struct drm_display_mode *m = pinfo->desc->display_mode; in boe_panel_get_modes()
199 dev_err(pinfo->base.dev, "failed to add mode %ux%u@%u\n", in boe_panel_get_modes()
208 connector->display_info.width_mm = pinfo->desc->width_mm; in boe_panel_get_modes()
209 connector->display_info.height_mm = pinfo->desc->height_mm; in boe_panel_get_modes()
210 connector->display_info.bpc = pinfo->desc->bpc; in boe_panel_get_modes()
827 static int panel_add(struct panel_info *pinfo) in panel_add() argument
829 struct device *dev = &pinfo->link->dev; in panel_add()
832 pinfo->pp18_gpio = devm_gpiod_get(dev, "pp18", GPIOD_OUT_HIGH); in panel_add()
833 if (IS_ERR(pinfo->pp18_gpio)) { in panel_add()
834 return dev_err_probe(dev, PTR_ERR(pinfo->pp18_gpio), in panel_add()
838 pinfo->pp33_gpio = devm_gpiod_get(dev, "pp33", GPIOD_OUT_HIGH); in panel_add()
839 if (IS_ERR(pinfo->pp33_gpio)) { in panel_add()
840 return dev_err_probe(dev, PTR_ERR(pinfo->pp33_gpio), in panel_add()
844 pinfo->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH); in panel_add()
845 if (IS_ERR(pinfo->enable_gpio)) { in panel_add()
846 return dev_err_probe(dev, PTR_ERR(pinfo->enable_gpio), in panel_add()
850 drm_panel_init(&pinfo->base, dev, &panel_funcs, in panel_add()
853 ret = drm_panel_of_backlight(&pinfo->base); in panel_add()
857 drm_panel_add(&pinfo->base); in panel_add()
864 struct panel_info *pinfo; in panel_probe() local
868 pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL); in panel_probe()
869 if (!pinfo) in panel_probe()
876 pinfo->desc = desc; in panel_probe()
878 pinfo->link = dsi; in panel_probe()
879 mipi_dsi_set_drvdata(dsi, pinfo); in panel_probe()
881 err = panel_add(pinfo); in panel_probe()
887 drm_panel_remove(&pinfo->base); in panel_probe()
894 struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); in panel_remove() local
901 drm_panel_remove(&pinfo->base); in panel_remove()