mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
power: smb1398: Do not disable FP_FET during IREV condition
Allow the charger to recover after a momentary IREV condition by using the configuration-bit to not-disable FP-FET in IREV. Change-Id: I22cad3bbc4bde0a143e3ff6e068e750a2c40e34b Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
This commit is contained in:
parent
efd7f5d40d
commit
a4f06c51fc
1 changed files with 9 additions and 0 deletions
|
|
@ -92,6 +92,7 @@
|
|||
#define MISC_CFG0_REG 0x2634
|
||||
#define DIS_SYNC_DRV_BIT BIT(5)
|
||||
#define SW_EN_SWITCHER_BIT BIT(3)
|
||||
#define CFG_DIS_FPF_IREV_BIT BIT(1)
|
||||
|
||||
#define MISC_CFG1_REG 0x2635
|
||||
#define MISC_CFG1_MASK GENMASK(7, 0)
|
||||
|
|
@ -1985,6 +1986,14 @@ static int smb1398_div2_cp_hw_init(struct smb1398_chip *chip)
|
|||
return rc;
|
||||
}
|
||||
|
||||
/* Do not disable FP_FET during IREV conditions */
|
||||
rc = smb1398_masked_write(chip, MISC_CFG0_REG, CFG_DIS_FPF_IREV_BIT, 0);
|
||||
if (rc < 0) {
|
||||
dev_err(chip->dev, "Couldn't set CFG_DIS_FPF_IREV_BIT, rc=%d\n",
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* switcher enable controlled by register */
|
||||
rc = smb1398_masked_write(chip, MISC_CFG0_REG,
|
||||
SW_EN_SWITCHER_BIT, SW_EN_SWITCHER_BIT);
|
||||
|
|
|
|||
Loading…
Reference in a new issue