}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 ){
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: