mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
backlight:fix resume backlight flash
This commit is contained in:
@@ -122,6 +122,13 @@ static int rk29_bl_update_status(struct backlight_device *bl)
|
||||
}else if(!(bl->props.state & BL_CORE_DRIVER2) && suspend_flag ){
|
||||
suspend_flag = 0;
|
||||
}
|
||||
div_total = read_pwm_reg(PWM_REG_LRC);
|
||||
if (ref) {
|
||||
divh = div_total*brightness/BL_STEP;
|
||||
} else {
|
||||
divh = div_total*(BL_STEP-brightness)/BL_STEP;
|
||||
}
|
||||
rk_pwm_setup(id, PWM_DIV, divh, div_total);
|
||||
|
||||
//BL_CORE_DRIVER1 is the flag if backlight pwm is closed.
|
||||
if ((bl->props.state & BL_CORE_DRIVER1) && brightness ==0 ){
|
||||
@@ -137,13 +144,6 @@ static int rk29_bl_update_status(struct backlight_device *bl)
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
div_total = read_pwm_reg(PWM_REG_LRC);
|
||||
if (ref) {
|
||||
divh = div_total*brightness/BL_STEP;
|
||||
} else {
|
||||
divh = div_total*(BL_STEP-brightness)/BL_STEP;
|
||||
}
|
||||
rk_pwm_setup(id, PWM_DIV, divh, div_total);
|
||||
|
||||
DBG("%s:line=%d,brightness = %d, div_total = %d, divh = %d state=%x \n",__FUNCTION__,__LINE__,brightness, div_total, divh,bl->props.state);
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user