mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
backlight: lm3530: set CABC register on first bootup
If we don't apply CABC register setting at the first bootup, then it makes a power difference between the bootup time and the first suspend and resume, approximately 38mA. Change-Id: I91c915af31e9ff6934ce733f3fb2c8b96e1adf31 Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
parent
e1a25b7d31
commit
68866784f6
1 changed files with 6 additions and 0 deletions
|
@ -136,6 +136,7 @@ static void lm3530_set_main_current_level(struct i2c_client *client, int level)
|
|||
mdelay(1);
|
||||
}
|
||||
|
||||
static bool first_boot = true;
|
||||
static void lm3530_backlight_on(struct i2c_client *client, int level)
|
||||
{
|
||||
struct lm3530_device *dev = i2c_get_clientdata(client);
|
||||
|
@ -149,6 +150,11 @@ static void lm3530_backlight_on(struct i2c_client *client, int level)
|
|||
lm3530_write_reg(dev->client, 0x10, dev->max_current);
|
||||
}
|
||||
|
||||
if (first_boot) {
|
||||
lm3530_write_reg(dev->client, 0x10, dev->max_current);
|
||||
first_boot = false;
|
||||
}
|
||||
|
||||
lm3530_set_main_current_level(dev->client, level);
|
||||
backlight_status = BL_ON;
|
||||
mutex_unlock(&backlight_mtx);
|
||||
|
|
Loading…
Reference in a new issue