Beispiel #1
0
static void lm3533_backlight_on(struct i2c_client *client, int level)
{
	struct lm3533_device *dev = i2c_get_clientdata(client);

	dev_dbg(&client->dev, "backlight on...\n");

	lm3533_hw_reset(dev);

	lm3533_bl_write_reg(client, 0x10, 0x0); //HVLED 1 & 2 are controlled by Bank A

#if defined(ENABLE_PWM_SIGNAL)        
	lm3533_bl_write_reg(client, 0x14, 0x1); //                                                                 
#else
	lm3533_bl_write_reg(client, 0x14, 0x0); //PWM input is disabled for CABC
#endif
	lm3533_bl_write_reg(client, 0x1A, 0x2); //Linear & Control Bank A is configured for register Current control
	lm3533_bl_write_reg(client, 0x27, 0x1); //Control Bank A is enable
#if !defined(CONFIG_MACH_HD5_LGD)        
	lm3533_bl_write_reg(client, 0x2C, 0x0A); //                                                                                   
#else
	lm3533_bl_write_reg(client, 0x2C, 0x0C); //Active High, OVP(24V), Boost Frequency(500 khz)  
#endif

	lm3533_set_main_current_level(client, level);

	//                                                                                          
		
	dev->bl_status = BL_ON;

	return;
}
Beispiel #2
0
void lm3533_backlight_on(int level)
{

#if defined(CONFIG_HAS_EARLYSUSPEND) && \
	(defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) || \
	defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL))

	if(is_early_suspended)
	{
		requested_in_early_suspend_lcd_level = level;
		return;
	}
#endif /* CONFIG_HAS_EARLYSUSPEND */
	if (backlight_status == BL_OFF) {

		lm3533_hw_reset();
		lm3533_write_reg(main_lm3533_dev->client, 0x10, 0x0); /* HVLED 1 & 2 are controlled by Bank A */

/*           
                                                           
                                      
  */
#if defined(CONFIG_LGE_BACKLIGHT_CABC)
		lm3533_write_reg(main_lm3533_dev->client, 0x14, 0x1); 	/* PWM input is enabled */
#else
		lm3533_write_reg(main_lm3533_dev->client, 0x14, 0x0); 	/* PWM input is disabled */
#endif
		lm3533_write_reg(main_lm3533_dev->client, 0x1A, 0x00);	/* Linear & Control Bank A is configured for register Current control */
		lm3533_write_reg(main_lm3533_dev->client, 0x1F, 0x13); /* Full-Scale Current (20.2mA) */
		lm3533_write_reg(main_lm3533_dev->client, 0x27, 0x1); 	/* Control Bank A is enable */
#if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) || \
	defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL)
		lm3533_write_reg(main_lm3533_dev->client, 0x2C, 0xC); /* Active High, OVP(32V), Boost Frequency(500khz) */
		lm3533_write_reg(main_lm3533_dev->client, 0x12, 0x9); /* START UP/SHUTDOWN TRANSITION */
		lm3533_write_reg(main_lm3533_dev->client, 0x13, 0x9); /* RUN-TIME TRANSITION */
#else
		lm3533_write_reg(main_lm3533_dev->client, 0x2C, 0xE); /*Active High, OVP(40V), Boost Frequency(500khz) */
#endif

	}

	lm3533_set_main_current_level(main_lm3533_dev->client, level);
	backlight_status = BL_ON;

	return;
}
static void lm3533_backlight_on(struct i2c_client *client, int level)
{
	struct lm3533_device *dev = i2c_get_clientdata(client);

	dev_dbg(&client->dev, "backlight on...\n");

	lm3533_hw_reset(dev);

	lm3533_bl_write_reg(client, 0x10, 0x0); //HVLED 1 & 2 are controlled by Bank A

	lm3533_bl_write_reg(client, 0x14, 0x0); //PWM input is disabled for CABC
	lm3533_bl_write_reg(client, 0x1A, 0x2); //Linear & Control Bank A is configured for register Current control
	lm3533_bl_write_reg(client, 0x1F, dev->cur_maxcurrent); //Full-Scale Current (default 20.2mA)
	lm3533_bl_write_reg(client, 0x27, 0x1); //Control Bank A is enable
	lm3533_bl_write_reg(client, 0x2C, 0x0A); //Active High, OVP(24V), Boost Frequency(500 khz)

	lm3533_set_main_current_level(client, level);

	dev->bl_status = BL_ON;

	return;
}