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:
Devin Kim 2012-09-27 18:35:04 -07:00 committed by Iliyan Malchev
parent e1a25b7d31
commit 68866784f6

View file

@ -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);