static void lcm_init(void)
{
#ifndef BUILD_LK
    return; //do nothing in LK
#else
  lcd_power_en(1);
	MDELAY(50); 
	
	SET_RESET_PIN(1);
	SET_RESET_PIN(0);
	MDELAY(1);
	SET_RESET_PIN(1);

	init_lcm_registers();
	
	MDELAY(270);
	lcd_backlight_en(1);
#endif
}
Example #2
0
static void lcm_init(void)
{

		LCM_DBG();
		#ifdef BUILD_LK
		printf("%s, LK \n", __func__);
	#else
		printk("%s, kernel", __func__);
	#endif
		//lcm_compare_id();
		//SET_RESET_PIN(0);
		lcd_power_en(1);
		MDELAY(80);
		lcd_reset(1);
		MDELAY(5);
		lcd_reset(0);
		MDELAY(5); 
		lcd_reset(1);
		MDELAY(120); 
		dsi_set_cmdq_V3(lcm_initialization_setting,sizeof(lcm_initialization_setting)/sizeof(lcm_initialization_setting[0]),1);		
}
static void lcm_resume(void)
{
	unsigned int data_array[16];

  lcd_power_en(1);
	init_lcm_registers();

	data_array[0] = 0x00101500; // Sleep Out
	dsi_set_cmdq(data_array, 1, 1);
	MDELAY(20);

	data_array[0] = 0x00290500; // Display On
	dsi_set_cmdq(data_array, 1, 1);
	
        data_array[0] = 0x0BAE1500;                                         
        dsi_set_cmdq(data_array, 1, 1);
        
        data_array[0] = 0xEAEE1500;                                          
        dsi_set_cmdq(data_array, 1, 1);
        
        data_array[0] = 0x5FEF1500;                                          
        dsi_set_cmdq(data_array, 1, 1);
           
        #if 1
        data_array[0] = 0x68F21500;                                          
        dsi_set_cmdq(data_array, 1, 1);
        data_array[0] = 0xFFD21500;                                          
        dsi_set_cmdq(data_array, 1, 1);
        #else
        data_array[0] = 0xEFB11500;                                          
        dsi_set_cmdq(data_array, 1, 1);
        #endif
        
	MDELAY(300);
	lcd_backlight_en(1);
}