static int mipi_jdi_panel_on(struct platform_device *pdev) { struct k3_fb_data_type *k3fd = NULL; struct k3_panel_info *pinfo = NULL; BUG_ON(pdev == NULL); k3fd = (struct k3_fb_data_type *)platform_get_drvdata(pdev); BUG_ON(k3fd == NULL); pinfo = &(k3fd->panel_info); if (pinfo->lcd_init_step == LCD_INIT_POWER_ON) { /* tp vcc enable */ vcc_cmds_tx(NULL, jdi_tp_vcc_enable_cmds, \ ARRAY_SIZE(jdi_tp_vcc_enable_cmds)); /* tk vcc enable */ if (g_touchkey_enable == true) { vcc_cmds_tx(pdev, jdi_tk_vcc_enable_cmds, \ ARRAY_SIZE(jdi_tk_vcc_enable_cmds)); } /* lcd vcc enable */ vcc_cmds_tx(NULL, jdi_lcd_vcc_enable_cmds, \ ARRAY_SIZE(jdi_lcd_vcc_enable_cmds)); pinfo->lcd_init_step = LCD_INIT_MIPI_LP_SEND_SEQUENCE; } else if (pinfo->lcd_init_step == LCD_INIT_MIPI_LP_SEND_SEQUENCE) { if (!g_display_on) { /* lcd display on */ jdi_disp_on(k3fd); skip_esd_once = true; } pinfo->lcd_init_step = LCD_INIT_MIPI_HS_SEND_SEQUENCE; } else if (pinfo->lcd_init_step == LCD_INIT_MIPI_HS_SEND_SEQUENCE) { g_display_on = true; backlight_log_once = true; } else { k3fb_loge("failed to init lcd!\n"); } return 0; }
static int mipi_jdi_panel_on(struct platform_device *pdev) { struct balong_fb_data_type *balongfd = NULL; struct balong_panel_info *pinfo = NULL; BUG_ON(pdev == NULL); balongfd = (struct balong_fb_data_type *)platform_get_drvdata(pdev); BUG_ON(balongfd == NULL); pr_info("%s enter succ!\n",__func__); pinfo = &(balongfd->panel_info); pr_info("%s,pinfo->lcd_init_step = %d!\n",__func__,pinfo->lcd_init_step); if (pinfo->lcd_init_step == LCD_INIT_POWER_ON) { /* set vcc current and voltage */ //LCD_VCC_SET_CURRENT(pinfo->lcd_bl_vcc, 20000, 20000); /* bl_vcc must be 20mA */ LCD_VCC_SET_VOLTAGE(pinfo->lcd_bias_vcc, 5000000, 5000000); /* 5.0V */ LCD_VCC_SET_VOLTAGE(pinfo->lcd_vsn_vcc, 5000000, 5000000); /* 5.0V */ LCD_VCC_SET_VOLTAGE(pinfo->lcd_vsp_vcc, 5000000, 5000000); /* 5.0V */ pinfo->lcd_init_step = LCD_INIT_SEND_SEQUENCE; } else if (pinfo->lcd_init_step == LCD_INIT_SEND_SEQUENCE) { if (!g_display_on) { LOG_JANK_D(JLID_KERNEL_LCD_POWER_ON, "%s", "JL_KERNEL_LCD_POWER_ON"); g_debug_enable = true; /* lcd display on */ jdi_disp_on(balongfd); g_display_on = true; } } else { balongfb_loge("failed to init lcd!\n"); } pr_info("%s exit succ!\n",__func__); return 0; }