Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f280edb authored by Ashish Chavan's avatar Ashish Chavan
Browse files

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: default avatarAshish Chavan <ashichav@codeaurora.org>
parent b27a9fb8
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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);