mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
power: pm8921-charger: force 19.2Mhz clock before accessing registers
The charger was observed to be in locked up state upon booting up. The initialization time configurations were being ignored causing charging to not happen. Fix this by forcing the charger to run from 19.2Mhz clock prior to accessing any charger registers. This made the charger come out of the locked up state and accept writes to it. Change-Id: I0d86c328d4c7022a3bd46c62cb28b12318053f74 CRs-Fixed: 372383 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
2577a712ce
commit
22406c702f
1 changed files with 3 additions and 2 deletions
|
@ -3308,6 +3308,9 @@ static int __devinit pm8921_chg_hw_init(struct pm8921_chg_chip *chip)
|
|||
int rc;
|
||||
int vdd_safe;
|
||||
|
||||
/* forcing 19p2mhz before accessing any charger registers */
|
||||
pm8921_chg_force_19p2mhz_clk(chip);
|
||||
|
||||
rc = pm_chg_masked_write(chip, SYS_CONFIG_2,
|
||||
BOOT_DONE_BIT, BOOT_DONE_BIT);
|
||||
if (rc) {
|
||||
|
@ -3501,8 +3504,6 @@ static int __devinit pm8921_chg_hw_init(struct pm8921_chg_chip *chip)
|
|||
/* Disable EOC FSM processing */
|
||||
pm8xxx_writeb(chip->dev->parent, CHG_BUCK_CTRL_TEST3, 0x91);
|
||||
|
||||
pm8921_chg_force_19p2mhz_clk(chip);
|
||||
|
||||
rc = pm_chg_masked_write(chip, CHG_CNTRL, VREF_BATT_THERM_FORCE_ON,
|
||||
VREF_BATT_THERM_FORCE_ON);
|
||||
if (rc)
|
||||
|
|
Loading…
Reference in a new issue