div_total = read_pwm_reg(id, PWM_REG_LRC);
if (ref) {
- #if defined(CONFIG_MACH_RK29_AIGO)
- divh = div_total*(BL_STEP - bl->props.brightness)/BL_STEP;
- #else
divh = div_total*(bl->props.brightness)/BL_STEP;
- #endif
DBG(">>>%s-->%d bl->props.brightness == %d, div_total == %d , divh == %d\n",__FUNCTION__,__LINE__,bl->props.brightness, div_total, divh);
} else {
DBG(">>>%s-->%d bl->props.brightness == %d\n",__FUNCTION__,__LINE__,bl->props.brightness);
struct rk29_bl_info *rk29_bl_info = (struct rk29_bl_info *)data;
u32 id, brightness;
u32 div_total, divh;
+
+ if (rk29_bl_info->pwm_resume)
+ rk29_bl_info->pwm_resume();
+
clk_enable(pwm_clk);
id = rk29_bl_info->pwm_id;
brightness = rk29_bl->props.brightness;
}
write_pwm_reg(id, PWM_REG_HRC, divh);
- if (!suspend_flag)
+ if (!suspend_flag) {
clk_disable(pwm_clk);
-
+ if (rk29_bl_info->pwm_suspend)
+ rk29_bl_info->pwm_suspend();
+ }
+
suspend_flag = 1;
+ del_timer_sync(&rk29_bl_info->timer);
}
platform_driver_register(&rk29_backlight_driver);
return 0;
}
-postcore_initcall_sync(rk29_backlight_init);
+fs_initcall_sync(rk29_backlight_init);