Lines Matching refs:pinfo

57 	int (*init_sequence)(struct panel_info *pinfo);
68 static int elish_boe_init_sequence(struct panel_info *pinfo) in elish_boe_init_sequence() argument
70 struct mipi_dsi_device *dsi0 = pinfo->dsi[0]; in elish_boe_init_sequence()
71 struct mipi_dsi_device *dsi1 = pinfo->dsi[1]; in elish_boe_init_sequence()
288 static int elish_csot_init_sequence(struct panel_info *pinfo) in elish_csot_init_sequence() argument
290 struct mipi_dsi_device *dsi0 = pinfo->dsi[0]; in elish_csot_init_sequence()
291 struct mipi_dsi_device *dsi1 = pinfo->dsi[1]; in elish_csot_init_sequence()
486 static int j606f_boe_init_sequence(struct panel_info *pinfo) in j606f_boe_init_sequence() argument
488 struct mipi_dsi_device *dsi = pinfo->dsi[0]; in j606f_boe_init_sequence()
1032 static void nt36523_reset(struct panel_info *pinfo) in nt36523_reset() argument
1034 gpiod_set_value_cansleep(pinfo->reset_gpio, 1); in nt36523_reset()
1036 gpiod_set_value_cansleep(pinfo->reset_gpio, 0); in nt36523_reset()
1038 gpiod_set_value_cansleep(pinfo->reset_gpio, 1); in nt36523_reset()
1040 gpiod_set_value_cansleep(pinfo->reset_gpio, 0); in nt36523_reset()
1046 struct panel_info *pinfo = to_panel_info(panel); in nt36523_prepare() local
1049 if (pinfo->prepared) in nt36523_prepare()
1052 ret = regulator_enable(pinfo->vddio); in nt36523_prepare()
1058 nt36523_reset(pinfo); in nt36523_prepare()
1060 ret = pinfo->desc->init_sequence(pinfo); in nt36523_prepare()
1062 regulator_disable(pinfo->vddio); in nt36523_prepare()
1067 pinfo->prepared = true; in nt36523_prepare()
1074 struct panel_info *pinfo = to_panel_info(panel); in nt36523_disable() local
1077 for (i = 0; i < DSI_NUM_MIN + pinfo->desc->is_dual_dsi; i++) { in nt36523_disable()
1078 ret = mipi_dsi_dcs_set_display_off(pinfo->dsi[i]); in nt36523_disable()
1080 dev_err(&pinfo->dsi[i]->dev, "failed to set display off: %d\n", ret); in nt36523_disable()
1083 for (i = 0; i < DSI_NUM_MIN + pinfo->desc->is_dual_dsi; i++) { in nt36523_disable()
1084 ret = mipi_dsi_dcs_enter_sleep_mode(pinfo->dsi[i]); in nt36523_disable()
1086 dev_err(&pinfo->dsi[i]->dev, "failed to enter sleep mode: %d\n", ret); in nt36523_disable()
1096 struct panel_info *pinfo = to_panel_info(panel); in nt36523_unprepare() local
1098 if (!pinfo->prepared) in nt36523_unprepare()
1101 gpiod_set_value_cansleep(pinfo->reset_gpio, 1); in nt36523_unprepare()
1102 regulator_disable(pinfo->vddio); in nt36523_unprepare()
1104 pinfo->prepared = false; in nt36523_unprepare()
1111 struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); in nt36523_remove() local
1114 ret = mipi_dsi_detach(pinfo->dsi[0]); in nt36523_remove()
1118 if (pinfo->desc->is_dual_dsi) { in nt36523_remove()
1119 ret = mipi_dsi_detach(pinfo->dsi[1]); in nt36523_remove()
1121 dev_err(&pinfo->dsi[1]->dev, "failed to detach from DSI1 host: %d\n", ret); in nt36523_remove()
1122 mipi_dsi_device_unregister(pinfo->dsi[1]); in nt36523_remove()
1125 drm_panel_remove(&pinfo->panel); in nt36523_remove()
1131 struct panel_info *pinfo = to_panel_info(panel); in nt36523_get_modes() local
1134 for (i = 0; i < pinfo->desc->num_modes; i++) { in nt36523_get_modes()
1135 const struct drm_display_mode *m = &pinfo->desc->modes[i]; in nt36523_get_modes()
1153 connector->display_info.width_mm = pinfo->desc->width_mm; in nt36523_get_modes()
1154 connector->display_info.height_mm = pinfo->desc->height_mm; in nt36523_get_modes()
1155 connector->display_info.bpc = pinfo->desc->bpc; in nt36523_get_modes()
1157 return pinfo->desc->num_modes; in nt36523_get_modes()
1162 struct panel_info *pinfo = to_panel_info(panel); in nt36523_get_orientation() local
1164 return pinfo->orientation; in nt36523_get_orientation()
1233 struct panel_info *pinfo; in nt36523_probe() local
1237 pinfo = devm_kzalloc(dev, sizeof(*pinfo), GFP_KERNEL); in nt36523_probe()
1238 if (!pinfo) in nt36523_probe()
1241 pinfo->vddio = devm_regulator_get(dev, "vddio"); in nt36523_probe()
1242 if (IS_ERR(pinfo->vddio)) in nt36523_probe()
1243 return dev_err_probe(dev, PTR_ERR(pinfo->vddio), "failed to get vddio regulator\n"); in nt36523_probe()
1245 pinfo->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in nt36523_probe()
1246 if (IS_ERR(pinfo->reset_gpio)) in nt36523_probe()
1247 return dev_err_probe(dev, PTR_ERR(pinfo->reset_gpio), "failed to get reset gpio\n"); in nt36523_probe()
1249 pinfo->desc = of_device_get_match_data(dev); in nt36523_probe()
1250 if (!pinfo->desc) in nt36523_probe()
1254 if (pinfo->desc->is_dual_dsi) { in nt36523_probe()
1255 info = &pinfo->desc->dsi_info; in nt36523_probe()
1268 pinfo->dsi[1] = mipi_dsi_device_register_full(dsi1_host, info); in nt36523_probe()
1269 if (!pinfo->dsi[1]) { in nt36523_probe()
1275 pinfo->dsi[0] = dsi; in nt36523_probe()
1276 mipi_dsi_set_drvdata(dsi, pinfo); in nt36523_probe()
1277 drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); in nt36523_probe()
1279 ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation); in nt36523_probe()
1285 if (pinfo->desc->has_dcs_backlight) { in nt36523_probe()
1286 pinfo->panel.backlight = nt36523_create_backlight(dsi); in nt36523_probe()
1287 if (IS_ERR(pinfo->panel.backlight)) in nt36523_probe()
1288 return dev_err_probe(dev, PTR_ERR(pinfo->panel.backlight), in nt36523_probe()
1291 ret = drm_panel_of_backlight(&pinfo->panel); in nt36523_probe()
1296 drm_panel_add(&pinfo->panel); in nt36523_probe()
1298 for (i = 0; i < DSI_NUM_MIN + pinfo->desc->is_dual_dsi; i++) { in nt36523_probe()
1299 pinfo->dsi[i]->lanes = pinfo->desc->lanes; in nt36523_probe()
1300 pinfo->dsi[i]->format = pinfo->desc->format; in nt36523_probe()
1301 pinfo->dsi[i]->mode_flags = pinfo->desc->mode_flags; in nt36523_probe()
1303 ret = mipi_dsi_attach(pinfo->dsi[i]); in nt36523_probe()