mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
backlight: lm3530: add level setting to bl_set_intensity()
When application calls FBIOBLANK ioctl without backlight control, even though bl_set_intensity() is called by fb_notifier_callback, the backlight level cannot be set properly. So this patch add the level changing to bl_set_intensity(). Change-Id: Id512c2f1bffbde2d47186d40071d05bc1388dc03
This commit is contained in:
parent
dc93c5a1ec
commit
20c283689b
1 changed files with 9 additions and 1 deletions
|
@ -201,7 +201,15 @@ EXPORT_SYMBOL(lm3530_lcd_backlight_pwm_disable);
|
||||||
|
|
||||||
static int bl_set_intensity(struct backlight_device *bd)
|
static int bl_set_intensity(struct backlight_device *bd)
|
||||||
{
|
{
|
||||||
lm3530_lcd_backlight_set_level(bd->props.brightness);
|
int brightness = bd->props.brightness;
|
||||||
|
|
||||||
|
if ((bd->props.state & BL_CORE_FBBLANK) ||
|
||||||
|
(bd->props.state & BL_CORE_SUSPENDED))
|
||||||
|
brightness = 0;
|
||||||
|
else if (brightness == 0)
|
||||||
|
brightness = DEFAULT_LEVEL;
|
||||||
|
|
||||||
|
lm3530_lcd_backlight_set_level(brightness);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue