update lcdc_lg_xga driver
This commit is contained in:
@@ -34,9 +34,9 @@ static struct pwm_device *bl_pwm0;
|
||||
* If PWM_LEVEL is greater than 64 and If we use PMIC8058-PWM,
|
||||
* PMIC must be in 9bit modulation mode.
|
||||
*/
|
||||
#define PWM_FREQ_HZ 20000
|
||||
#define PWM_FREQ_HZ 300
|
||||
#define PWM_PERIOD_USEC (USEC_PER_SEC / PWM_FREQ_HZ)
|
||||
#define PWM_LEVEL 256
|
||||
#define PWM_LEVEL 15
|
||||
#define PWM_DUTY_LEVEL (PWM_PERIOD_USEC / PWM_LEVEL)
|
||||
#endif
|
||||
|
||||
@@ -56,16 +56,20 @@ static int lcdc_lg_panel_off(struct platform_device *pdev)
|
||||
|
||||
static void lcdc_lg_panel_set_backlight(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
unsigned int bl_level;
|
||||
int bl_level;
|
||||
int ret;
|
||||
|
||||
bl_level = mfd->bl_level;
|
||||
|
||||
if (lcdc_lg_pdata && lcdc_lg_pdata->pmic_backlight)
|
||||
lcdc_lg_pdata->pmic_backlight(bl_level);
|
||||
|
||||
#ifdef CONFIG_PMIC8058_PWM
|
||||
if (bl_pwm0)
|
||||
{
|
||||
#if 0 // green - this is noop in .35 too
|
||||
ret = pwm_config2(bl_pwm0, bl_level, PWM_LEVEL, PWM_PERIOD_USEC);
|
||||
#if 1 // green - this is noop in .35 too
|
||||
ret = pwm_config(bl_pwm0, PWM_DUTY_LEVEL * bl_level,
|
||||
PWM_PERIOD_USEC);
|
||||
if (ret)
|
||||
printk(KERN_ERR "pwm_config on pwm 0 failed %d\n", ret);
|
||||
#endif
|
||||
@@ -137,6 +141,8 @@ static int __init lcdc_lg_panel_init(void)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
printk(KERN_ERR "lcdc_lg_panel_init: called\n");
|
||||
|
||||
ret = platform_driver_register(&this_driver);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -149,9 +155,10 @@ static int __init lcdc_lg_panel_init(void)
|
||||
pinfo->wait_cycle = 0;
|
||||
pinfo->bpp = 18;
|
||||
pinfo->fb_num = 2;
|
||||
pinfo->clk_rate = 96000000;
|
||||
pinfo->bl_max = PWM_LEVEL;
|
||||
pinfo->bl_min = 0;
|
||||
// pinfo->clk_rate = 96000000;
|
||||
pinfo->clk_rate = 76800000;
|
||||
pinfo->bl_max = 15;
|
||||
pinfo->bl_min = 1;
|
||||
|
||||
pinfo->lcdc.h_back_porch = 400;
|
||||
pinfo->lcdc.h_front_porch = 272;
|
||||
|
||||
Reference in New Issue
Block a user