static void lcd_esd_seq(struct esd_data_t *p_esd_data) { struct msm_fb_data_type *mfd; struct msm_fb_panel_data *pdata; #if defined(CONFIG_FB_MSM_MIPI_NOVATEK_VIDEO_HD_PT_PANEL) int retry; #endif mfd = platform_get_drvdata(mipi_control.mipi_dev); if (mfd->panel_power_on) { #ifndef ESD_DEBUG /* threaded irq can sleep */ wake_lock_timeout(&p_esd_data->det_wake_lock, WAKE_LOCK_TIME); #endif pr_info("lcd_esd_seq + \n"); p_esd_data->refresh_ongoing = true; set_esd_refresh(true); p_esd_data->esd_ignore = true; #if defined(CONFIG_FB_MSM_MIPI_NOVATEK_VIDEO_HD_PT_PANEL) for(retry=0; retry<10; retry++) { esd_recovery(); msleep(500); if(!gpio_get_value(GPIO_LCD_ESD_DET)) break; else printk(KERN_ERR "ESD Retry!!!! (cnt=%d)\n",retry+1); } #endif p_esd_data->refresh_ongoing = false; set_esd_refresh(false); p_esd_data->esd_processed_count++; pr_info("lcd_esd_seq - \n"); /* Restore brightness */ pdata = mipi_control.mipi_dev->dev.platform_data; pdata->set_backlight(mfd); } else { pr_err("Panel is Off Skip ESD Sequence\n"); } #ifdef READ_REGISTER_ESD complete(&esd_completion); #endif }
static void lcd_esd_seq(struct esd_data_t *p_esd_data) { struct msm_fb_data_type *mfd; struct msm_fb_panel_data *pdata; mfd = platform_get_drvdata(mipi_control.mipi_dev); if (mfd->panel_power_on) { #ifndef ESD_DEBUG /* threaded irq can sleep */ wake_lock_timeout(&p_esd_data->det_wake_lock, WAKE_LOCK_TIME); #endif p_esd_data->refresh_ongoing = true; set_esd_refresh(true); p_esd_data->esd_ignore = true; mfd->fbi->fbops->fb_blank(FB_BLANK_VSYNC_SUSPEND, mfd->fbi); pr_info("Mipi ESD Turn off comple..........\n"); msleep(100); mfd->fbi->fbops->fb_blank(FB_BLANK_UNBLANK, mfd->fbi); mfd->fbi->fbops->fb_pan_display(&mfd->fbi->var, mfd->fbi); pr_info("Mipi ESD Turn On complete...........\n"); p_esd_data->refresh_ongoing = false; set_esd_refresh(false); p_esd_data->esd_processed_count++; /* Restore brightness */ pdata = mipi_control.mipi_dev->dev.platform_data; #if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT) || \ defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_CMD_QHD_PT) reset_gamma_level(); #endif pdata->set_backlight(mfd); } else { pr_err("Panel is Off Skip ESD Sequence\n"); } }