static int mipi_lgit_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;

#ifdef LGIT_IEF_SWITCH
	if(local_mfd0 == NULL)
		local_mfd0 = mfd;
#endif

	printk(KERN_INFO "entering %s .. \n", __func__);

	mipi_lgit_lcd_reset();

	if(lge_bd_rev < LGE_REV_C)
		mipi_dsi_cmds_tx(&lgit_tx_buf, lgit_power_on_set, ARRAY_SIZE(lgit_power_on_set));
	else			
		mipi_dsi_cmds_tx(&lgit_tx_buf, lgit_power_on_set_2P5, ARRAY_SIZE(lgit_power_on_set_2P5));
		
#ifdef LGIT_IEF_SWITCH
	if(!is_ief_on) // if camera is on, turn ief off
		mipi_dsi_cmds_tx(&lgit_tx_buf, lgit_power_on_set_camera, ARRAY_SIZE(lgit_power_on_set_camera));
#endif

	printk(KERN_INFO "exting %s .. \n", __func__);
	
	return 0;                                                                             
}                                                                                             
static int mipi_lgit_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;

	printk(KERN_INFO"%s: mipi lgit lcd on started, lge_bd_rev = %d \n", __func__, lge_bd_rev);
	mipi_lgit_lcd_reset();
	mipi_dsi_op_mode_config(DSI_CMD_MODE);

	//display on each panel
	//This is seperated by HW rev.
	if(lge_bd_rev < LGE_REV_E)
		mipi_dsi_cmds_tx(mfd, &lgit_tx_buf, lgit_power_on_set, ARRAY_SIZE(lgit_power_on_set));
	else {
		if(lge_bd_rev == LGE_REV_E)
			mipi_dsi_cmds_tx(mfd, &lgit_tx_buf, lgit_power_on_set_2P3, ARRAY_SIZE(lgit_power_on_set_2P3));
		else
			mipi_dsi_cmds_tx(mfd, &lgit_tx_buf, lgit_power_on_set_2P5, ARRAY_SIZE(lgit_power_on_set_2P5));
	}		
	

	return 0;
}
Ejemplo n.º 3
0
static int mipi_lgit_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;

#ifdef LGIT_IEF_SWITCH
	if(local_mfd0 == NULL)
		local_mfd0 = mfd;
#endif

	printk(KERN_INFO"%s: mipi lgit lcd on started, lge_bd_rev = %d \n", __func__, lge_bd_rev);
	mipi_lgit_lcd_reset();
	//mipi_dsi_op_mode_config(DSI_CMD_MODE);

	//display on each panel
	//This is seperated by HW rev.
	if(lge_bd_rev < LGE_REV_E)
		mipi_dsi_cmds_tx(mfd, &lgit_tx_buf, lgit_power_on_set, ARRAY_SIZE(lgit_power_on_set));
	else {
		if(lge_bd_rev == LGE_REV_E)
			mipi_dsi_cmds_tx(mfd, &lgit_tx_buf, lgit_power_on_set_2P3, ARRAY_SIZE(lgit_power_on_set_2P3));
		else
			mipi_dsi_cmds_tx(mfd, &lgit_tx_buf, lgit_power_on_set_2P5, ARRAY_SIZE(lgit_power_on_set_2P5));
	}
	
//if camera is on
#ifdef LGIT_IEF_SWITCH
	if(!is_ief_on) // if camera is on, turn ief off
		mipi_dsi_cmds_tx(local_mfd0, &lgit_tx_buf, lgit_power_on_set_camera, ARRAY_SIZE(lgit_power_on_set_camera));
#endif

	return 0;
}