static int hx8357c_lcd_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; int ret = 0; /* open debug file and read the para */ para_debug_flag = lcd_debug_malloc_get_para( "hx8357c_hvga_init_table", (void**)&hx8357c_hvga_init_table,¶_num); /* If exist the init file ,then init lcd with it for debug */ if( (TRUE == para_debug_flag)&&(NULL != hx8357c_hvga_init_table)) { ret = process_mddi_table(hx8357c_hvga_init_table, para_num, lcd_panel_hvga); } else { /* Exit Standby Mode */ ret = process_mddi_table((struct sequence*)&hx8357c_hvga_standby_exit_table, ARRAY_SIZE(hx8357c_hvga_standby_exit_table), lcd_panel_hvga); } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != hx8357c_hvga_init_table)) { lcd_debug_free_para((void *)hx8357c_hvga_init_table); } LCD_DEBUG("%s: hx8357c_lcd exit sleep mode ,on_ret=%d\n",__func__,ret); return ret; }
static int hx8357c_hvga_panel_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; /* open debug file and read the para */ switch(lcd_panel_hvga) { case LCD_HX8357C_TIANMA_HVGA: para_debug_flag = lcd_debug_malloc_get_para( "hx8357c_tianma_hvga_init_table", (void**)&hx8357c_hvga_init_table,¶_num); break; default: break; } if (!hx8357c_hvga_state.disp_initialized) { hx8357c_hvga_reset(); lcd_spi_init(lcdc_hx8357c_hvga_pdata); /* LCD needs SPI */ hx8357c_hvga_disp_powerup(); hx8357c_hvga_disp_on(); hx8357c_hvga_state.disp_initialized = TRUE; if( (TRUE == para_debug_flag) && (NULL != hx8357c_hvga_init_table)) { // lcd_reset(); process_lcdc_table(hx8357c_hvga_init_table, para_num,lcd_panel_hvga); } LCD_DEBUG("%s: hx8357c lcd initialized\n", __func__); } else if (!hx8357c_hvga_state.display_on) { switch(lcd_panel_hvga) { case LCD_HX8357C_TIANMA_HVGA: if( (TRUE == para_debug_flag)&&(NULL != hx8357c_hvga_init_table)) { // lcd_reset(); process_lcdc_table(hx8357c_hvga_init_table, para_num,lcd_panel_hvga); } else { /* Exit Standby Mode */ process_lcdc_table((struct sequence*)&hx8357c_tianma_hvga_standby_exit_table, ARRAY_SIZE(hx8357c_tianma_hvga_standby_exit_table), lcd_panel_hvga); } break; default: break; } LCD_DEBUG("%s: Exit Standby Mode\n", __func__); hx8357c_hvga_state.display_on = TRUE; } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != hx8357c_hvga_init_table)) { lcd_debug_free_para((void *)hx8357c_hvga_init_table); } return 0; }
static int nt35410_hvga_panel_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; switch(lcd_panel_hvga) { case LCD_NT35410_CHIMEI_HVGA: para_debug_flag = lcd_debug_malloc_get_para( "lcdc_nt35410_hvga_init_table", (void**)&lcdc_nt35410_hvga_init_table,¶_num); break; default: break; } if (!nt35410_hvga_state.disp_initialized) { nt35410_hvga_reset(); lcd_spi_init(lcdc_nt35410_hvga_pdata); /* LCD needs SPI */ nt35410_hvga_disp_powerup(); nt35410_hvga_disp_on(); nt35410_hvga_state.disp_initialized = TRUE; if((TRUE == para_debug_flag) && (NULL != lcdc_nt35410_hvga_init_table)) { process_lcdc_table(lcdc_nt35410_hvga_init_table,para_num,lcd_panel_hvga); } LCD_DEBUG("%s: nt35410 lcd initialized\n", __func__); } else if (!nt35410_hvga_state.display_on) { switch(lcd_panel_hvga) { case LCD_NT35410_CHIMEI_HVGA: if( (TRUE == para_debug_flag)&&(NULL != lcdc_nt35410_hvga_init_table)) { process_lcdc_table(lcdc_nt35410_hvga_init_table,para_num,lcd_panel_hvga); } else { /* Exit Standby Mode */ process_lcdc_table((struct sequence*)&nt35410_chimei_hvga_standby_exit_table, ARRAY_SIZE(nt35410_chimei_hvga_standby_exit_table),lcd_panel_hvga); } break; default: break; } LCD_DEBUG("%s: Exit Standby Mode\n", __func__); nt35410_hvga_state.display_on = TRUE; } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != lcdc_nt35410_hvga_init_table)) { lcd_debug_free_para((void *)lcdc_nt35410_hvga_init_table); } return 0; }
static int lcdc_s6d74a0_panel_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; LCD_DEBUG("ENTER lcdc_s6d74a0_panel_on\n"); /* open debug file and read the para */ switch(lcd_panel_hvga) { case LCD_S6D74A0_SAMSUNG_HVGA: para_debug_flag = lcd_debug_malloc_get_para( "s6d74a0_samsung_init_table", (void**)&s6d74a0_samsung_init_table,¶_num); break; default: break; } if(!lcd_s6d74a0_state.disp_initialized) { lcdc_s6d74a0_pdata->panel_config_gpio(1); lcd_reset_gpio = *(lcdc_s6d74a0_pdata->gpio_num + 4); lcd_spi_init(lcdc_s6d74a0_pdata); /* LCD needs SPI */ lcd_s6d74a0_disp_powerup(); lcd_s6d74a0_state.display_on = TRUE; lcd_s6d74a0_state.disp_initialized = TRUE; } else if(!lcd_s6d74a0_state.display_on) { switch(lcd_panel_hvga) { case LCD_S6D74A0_SAMSUNG_HVGA: if((TRUE == para_debug_flag) &&(NULL != s6d74a0_samsung_init_table)) { //seriout(0x0010, 0x0000); the table should add this value on the front delete by zhangpeng 20110112 process_lcdc_table(s6d74a0_samsung_init_table, para_num, LCD_S6D74A0_SAMSUNG_HVGA); } else { process_lcdc_table((struct sequence*)&s6d74a0_samsung_init, ARRAY_SIZE(s6d74a0_samsung_init), LCD_S6D74A0_SAMSUNG_HVGA); } break; default: break; } lcd_s6d74a0_state.display_on = TRUE; } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != s6d74a0_samsung_init_table)) { lcd_debug_free_para((void *)s6d74a0_samsung_init_table); } return 0; }
static int nt35560_lcd_on(struct platform_device *pdev) { int ret = 0; boolean para_debug_flag = FALSE; uint32 para_num = 0; /* open debug file and read the para */ switch(lcd_panel_fwvga) { case LCD_NT35560_TOSHIBA_FWVGA: para_debug_flag = lcd_debug_malloc_get_para( "nt35560_toshiba_fwvga_init_table", (void**)&nt35560_fwvga_init_table,¶_num); break; default: break; } /* If exist the init file ,then init lcd with it for debug */ if( (TRUE == para_debug_flag)&&(NULL != nt35560_fwvga_init_table)) { ret = process_mddi_table(nt35560_fwvga_init_table, para_num, lcd_panel_fwvga); } else { /*<DTS2011081002714 jiaoshuangwei 20110810 begin*/ if(machine_is_msm8255_u8860lp() /* < DTS2012022905490 ganfan 20120301 begin */ || machine_is_msm8255_u8860_r() /* DTS2012022905490 ganfan 20120301 end > */ /*<DTS2011091502092 liyuping 20110915 begin */ || machine_is_msm8255_u8860_51()) /* DTS2011091502092 liyuping 20110915 end> */ { /* Exit Standby Mode */ ret = process_mddi_table((struct sequence*)&nt35560_fwvga_standby_exit_tablelp, ARRAY_SIZE(nt35560_fwvga_standby_exit_tablelp), lcd_panel_fwvga); } else { /* Exit Standby Mode */ ret = process_mddi_table((struct sequence*)&nt35560_fwvga_standby_exit_table, ARRAY_SIZE(nt35560_fwvga_standby_exit_table), lcd_panel_fwvga); } /*DTS2011081002714 jiaoshuangwei 20110810 end >*/ } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != nt35560_fwvga_init_table)) { lcd_debug_free_para((void *)nt35560_fwvga_init_table); } LCD_DEBUG("%s: nt35560_lcd exit sleep mode ,on_ret=%d\n",__func__,ret); return ret; }
/*setting for support continuous splash */ static int mipi_nt35512_lcd_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; struct msm_fb_data_type *mfd; mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; para_debug_flag = lcd_debug_malloc_get_para( "nt35512_lcd_init_table_debug", (void**)&nt35512_lcd_init_table_debug,¶_num); lcd_reset(); mipi_set_tx_power_mode(1);//Low power mode if( (TRUE == para_debug_flag) && (NULL != nt35512_lcd_init_table_debug)) { process_mipi_table(mfd,&nt35512_tx_buf,nt35512_lcd_init_table_debug, para_num, lcd_panel_wvga); } else { /*Add nt35512 video mode for byd*/ if (MIPI_VIDEO_NT35512_BOE_WVGA == lcd_panel_wvga ){ process_mipi_table(mfd,&nt35512_tx_buf,(struct sequence*)&nt35512_boe_lcd_init_table, ARRAY_SIZE(nt35512_boe_lcd_init_table), lcd_panel_wvga); } else if ( MIPI_VIDEO_NT35512_BYD_WVGA == lcd_panel_wvga ){ process_mipi_table(mfd,&nt35512_tx_buf,(struct sequence*)&nt35512_byd_lcd_init_table, ARRAY_SIZE(nt35512_byd_lcd_init_table), lcd_panel_wvga); } } mipi_set_tx_power_mode(0); //High speed mode if((TRUE == para_debug_flag)&&(NULL != nt35512_lcd_init_table_debug)) { lcd_debug_free_para((void *)nt35512_lcd_init_table_debug); } if (!mfd->cont_splash_done) { mfd->cont_splash_done = 1; nt35512_cabc_enable_table[1].reg = 0x00064; process_mipi_table(mfd,&nt35512_tx_buf,(struct sequence*)&nt35512_cabc_enable_table, ARRAY_SIZE(nt35512_cabc_enable_table), lcd_panel_wvga); } LCD_DEBUG("leave mipi_nt35512_lcd_on \n"); return 0; }
static int nt35582_lcd_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; int ret = 0; /* open debug file and read the para */ switch(lcd_panel_wvga) { case LCD_NT35582_TRULY_WVGA: para_debug_flag = lcd_debug_malloc_get_para( "nt35582_truly_wvga_init_table", (void**)&nt35582_wvga_init_table,¶_num); break; case LCD_NT35582_BYD_WVGA: para_debug_flag = lcd_debug_malloc_get_para( "nt35582_byd_wvga_init_table", (void**)&nt35582_wvga_init_table,¶_num); break; default: break; } /* If exist the init file ,then init lcd with it for debug */ if( (TRUE == para_debug_flag)&&(NULL != nt35582_wvga_init_table)) { ret = process_lcd_table(nt35582_wvga_init_table, para_num, lcd_panel_wvga); } else { /* Exit Standby Mode */ ret = process_lcd_table((struct sequence*)&nt35582_wvga_standby_exit_table, ARRAY_SIZE(nt35582_wvga_standby_exit_table), lcd_panel_wvga); } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != nt35582_wvga_init_table)) { lcd_debug_free_para((void *)nt35582_wvga_init_table); } MDDI_LCD_DEBUG("%s: nt35582_lcd exit sleep mode ,on_ret=%d\n",__func__,ret); return ret; }
static int nt35560_lcd_on(struct platform_device *pdev) { int ret = 0; boolean para_debug_flag = FALSE; uint32 para_num = 0; /* open debug file and read the para */ switch(lcd_panel_fwvga) { case LCD_NT35560_TOSHIBA_FWVGA: para_debug_flag = lcd_debug_malloc_get_para( "nt35560_toshiba_fwvga_init_table", (void**)&nt35560_fwvga_init_table,¶_num); break; default: break; } /* If exist the init file ,then init lcd with it for debug */ if( (TRUE == para_debug_flag)&&(NULL != nt35560_fwvga_init_table)) { ret = process_lcd_table(nt35560_fwvga_init_table, para_num, lcd_panel_fwvga); } else { if(machine_is_msm8255_u8860lp() || machine_is_msm8255_u8860_51()) { /* Exit Standby Mode */ ret = process_lcd_table((struct sequence*)&nt35560_fwvga_standby_exit_tablelp, ARRAY_SIZE(nt35560_fwvga_standby_exit_tablelp), lcd_panel_fwvga); } else { /* Exit Standby Mode */ ret = process_lcd_table((struct sequence*)&nt35560_fwvga_standby_exit_table, ARRAY_SIZE(nt35560_fwvga_standby_exit_table), lcd_panel_fwvga); } } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != nt35560_fwvga_init_table)) { lcd_debug_free_para((void *)nt35560_fwvga_init_table); } MDDI_LCD_DEBUG("%s: nt35560_lcd exit sleep mode ,on_ret=%d\n",__func__,ret); return ret; }
/*setting for support continuous splash */ static int mipi_hx8369b_lcd_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; struct msm_fb_data_type *mfd; mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; para_debug_flag = lcd_debug_malloc_get_para( "hx8369b_lcd_init_table_debug", (void**)&hx8369b_lcd_init_table_debug,¶_num); lcd_reset(); mipi_set_tx_power_mode(1);//Low power mode if( (TRUE == para_debug_flag) && (NULL != hx8369b_lcd_init_table_debug)) { process_mipi_table(mfd,&hx8369b_tx_buf,hx8369b_lcd_init_table_debug, para_num, lcd_panel_wvga); } else { process_mipi_table(mfd,&hx8369b_tx_buf,(struct sequence*)&hx8369b_tianma_lcd_init_table, ARRAY_SIZE(hx8369b_tianma_lcd_init_table), lcd_panel_wvga); } mipi_set_tx_power_mode(0);//High speed mode if((TRUE == para_debug_flag)&&(NULL != hx8369b_lcd_init_table_debug)) { lcd_debug_free_para((void *)hx8369b_lcd_init_table_debug); } if (!mfd->cont_splash_done) { mfd->cont_splash_done = 1; hx8369b_wvga_write_cabc_brightness_table[1].reg = 0x00064; process_mipi_table(mfd,&hx8369b_tx_buf,(struct sequence*)&hx8369b_wvga_write_cabc_brightness_table, ARRAY_SIZE(hx8369b_wvga_write_cabc_brightness_table), lcd_panel_wvga); } LCD_DEBUG("leave mipi_otm8018b_lcd_on \n"); return 0; }
static int rsp61408_lcd_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; int ret = 0; switch(lcd_panel_wvga) { case MDDI_RSP61408_BYD_WVGA: case MDDI_RSP61408_CHIMEI_WVGA: para_debug_flag = lcd_debug_malloc_get_para( "rsp61408_wvga_init_table", (void**)&rsp61408_wvga_init_table,¶_num); break; default: break; } if( (TRUE == para_debug_flag)&&(NULL != rsp61408_wvga_init_table)) { ret = process_mddi_table(rsp61408_wvga_init_table, para_num, lcd_panel_wvga); } else { /*reset the direction register to resolve the problem of revert. */ /* Exit Standby Mode */ if(machine_is_msm8255_u8730()) { ret = process_mddi_table((struct sequence*)&reverse_rsp61408_wvga_exit_table, ARRAY_SIZE(reverse_rsp61408_wvga_exit_table), lcd_panel_wvga); } else { ret = process_mddi_table((struct sequence*)&rsp61408_wvga_standby_exit_table, ARRAY_SIZE(rsp61408_wvga_standby_exit_table), lcd_panel_wvga); } } if((TRUE == para_debug_flag)&&(NULL != rsp61408_wvga_init_table)) { lcd_debug_free_para((void *)rsp61408_wvga_init_table); } LCD_DEBUG("%s: rsp61408_lcd exit sleep mode ,on_ret=%d\n",__func__,ret); return ret; }
static int mipi_nt35516_lcd_on(struct platform_device *pdev) { /*delete some lines */ boolean para_debug_flag = FALSE; uint32 para_num = 0; struct msm_fb_data_type *mfd; mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; /*delete some lines */ para_debug_flag = lcd_debug_malloc_get_para( "nt35516_lcd_init_table_debug", (void**)&nt35516_lcd_init_table_debug,¶_num); if( (TRUE == para_debug_flag) && (NULL != nt35516_lcd_init_table_debug)) { process_mipi_table(mfd,&nt35516_tx_buf,nt35516_lcd_init_table_debug, para_num, lcd_panel_qhd); } else { /* change mipi transmit mode to low power when load sequences */ mipi_set_tx_power_mode(1); process_mipi_table(mfd,&nt35516_tx_buf,(struct sequence*)&nt35516_hvga_standby_exit_table, ARRAY_SIZE(nt35516_hvga_standby_exit_table), lcd_panel_qhd); mipi_set_tx_power_mode(0); /*delete some lines */ } if((TRUE == para_debug_flag)&&(NULL != nt35516_lcd_init_table_debug)) { lcd_debug_free_para((void *)nt35516_lcd_init_table_debug); } pr_info("leave mipi_nt35516_lcd_on \n"); return 0; }
/*lcd resume function*/ static int mipi_nt35510_lcd_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; struct msm_fb_data_type *mfd; mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; para_debug_flag = lcd_debug_malloc_get_para( "nt35510_lcd_init_table_debug", (void**)&nt35510_lcd_init_table_debug,¶_num); if( (TRUE == para_debug_flag) && (NULL != nt35510_lcd_init_table_debug)) { process_mipi_table(mfd,&nt35510_tx_buf,nt35510_lcd_init_table_debug, para_num, lcd_panel_wvga); } else { mipi_set_tx_power_mode(1); process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_wvga_standby_exit_table, ARRAY_SIZE(nt35510_wvga_standby_exit_table), lcd_panel_wvga); mipi_set_tx_power_mode(0); } if((TRUE == para_debug_flag)&&(NULL != nt35510_lcd_init_table_debug)) { lcd_debug_free_para((void *)nt35510_lcd_init_table_debug); } mipi_nt35510_read_register(mfd); LCD_DEBUG("leave mipi_nt35510_lcd_on \n"); return 0; }
static int nt35510_lcd_on_type2(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; int ret = 0; /* open debug file and read the para */ switch(lcd_panel_wvga) { case LCD_NT35510_ALPHA_SI_WVGA_TYPE2: para_debug_flag = lcd_debug_malloc_get_para( "nt35510_alpha_si_wvga_init_table_type2", (void**)&nt35510_wvga_init_table_type2,¶_num); break; default: break; } /* If exist the init file ,then init lcd with it for debug */ if( (TRUE == para_debug_flag)&&(NULL != nt35510_wvga_init_table_type2)) { ret = process_mddi_table(nt35510_wvga_init_table_type2, para_num, lcd_panel_wvga); } else { /* Exit Standby Mode */ ret = process_mddi_table((struct sequence*)&nt35510_wvga_standby_exit_table_type2, ARRAY_SIZE(nt35510_wvga_standby_exit_table_type2), lcd_panel_wvga); } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != nt35510_wvga_init_table_type2)) { lcd_debug_free_para((void *)nt35510_wvga_init_table_type2); } LCD_DEBUG("%s: nt35510_lcd exit sleep mode ,on_ret=%d\n",__func__,ret); return ret; }
static int truly_r61529_hvga_panel_on(struct platform_device *pdev) { boolean para_debug_flag = FALSE; uint32 para_num = 0; /* open debug file and read the para */ switch(lcd_panel_hvga) { case LCD_R61529_TRULY_HVGA: para_debug_flag = lcd_debug_malloc_get_para( "truly_r61529_hvga_init_table", (void**)&truly_r61529_hvga_init_table,¶_num); break; default: break; } if (!truly_r61529_hvga_state.disp_initialized) { truly_r61529_hvga_reset(); lcd_spi_init(lcdc_truly_r61529_hvga_pdata); /* LCD needs SPI */ truly_r61529_hvga_disp_powerup(); truly_r61529_hvga_disp_on(); truly_r61529_hvga_state.disp_initialized = TRUE; if( (TRUE == para_debug_flag) && (NULL != truly_r61529_hvga_init_table)) { // lcd_reset(); process_lcdc_table(truly_r61529_hvga_init_table, para_num,lcd_panel_hvga); } LCD_DEBUG("%s: truly r61529 lcd initialized\n", __func__); } else if (!truly_r61529_hvga_state.display_on) { switch(lcd_panel_hvga) { case LCD_R61529_TRULY_HVGA: if( (TRUE == para_debug_flag)&&(NULL != truly_r61529_hvga_init_table)) { //lcd_reset(); process_lcdc_table(truly_r61529_hvga_init_table, para_num,lcd_panel_hvga); } else { /* Exit Standby Mode */ process_lcdc_table((struct sequence*)&truly_r61529_hvga_standby_exit_table, ARRAY_SIZE(truly_r61529_hvga_standby_exit_table), lcd_panel_hvga); } /* we use this function to set low to the SPI CS pin * to ensure this LCD can enter sleep mode and be waken up */ truly_r61529_set_cs(lcdc_truly_r61529_hvga_pdata); break; default: break; } LCD_DEBUG("%s: Exit Standby Mode\n", __func__); truly_r61529_hvga_state.display_on = TRUE; } /* Must malloc before,then you can call free */ if((TRUE == para_debug_flag)&&(NULL != truly_r61529_hvga_init_table)) { lcd_debug_free_para((void *)truly_r61529_hvga_init_table); } return 0; }