power: pm8921-charger: change BOOT_DONE configuration

Set the BOOT_TIMER_EN bit when writing the
BOOT_DONE configuration. This is required to make
sure the boot timer will be enabled during the
next phone boot.

Change-Id: I0c43de3a0c285979f7bccd42e464ca0d2fbbe42a
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
This commit is contained in:
David Keitel 2012-06-14 11:22:30 -07:00 committed by Stephen Boyd
parent bdb6e1a459
commit a79d77b75c

View file

@ -3385,6 +3385,8 @@ static void detect_battery_removal(struct pm8921_chg_chip *chip)
#define ENUM_TIMER_STOP_BIT BIT(1)
#define BOOT_DONE_BIT BIT(6)
#define BOOT_TIMER_EN_BIT BIT(1)
#define BOOT_DONE_MASK (BOOT_DONE_BIT | BOOT_TIMER_EN_BIT)
#define CHG_BATFET_ON_BIT BIT(3)
#define CHG_VCP_EN BIT(0)
#define CHG_BAT_TEMP_DIS_BIT BIT(2)
@ -3400,7 +3402,7 @@ static int __devinit pm8921_chg_hw_init(struct pm8921_chg_chip *chip)
detect_battery_removal(chip);
rc = pm_chg_masked_write(chip, SYS_CONFIG_2,
BOOT_DONE_BIT, BOOT_DONE_BIT);
BOOT_DONE_MASK, BOOT_DONE_MASK);
if (rc) {
pr_err("Failed to set BOOT_DONE_BIT rc=%d\n", rc);
return rc;