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

Commit d1f83ece authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

power: smb135x-charger: Disable TEMP MONITOR in parallel charger mode



The parallel SMB135x charger configuration may share battery thermistor
with PMIC and hence the default configuration has TEMP MONITOR enabled.
As the battery-temperature based parallel charger control is managed in SW,
disable the hardware TEMP MONITOR configuration on SMB135x.

CRs-Fixed: 1058586
Change-Id: Ic09ff82ddf9efbb9f1766c8bba1a5b50adafb157
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent e5b04012
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@
#define BATT_MISSING_THERM_BIT		BIT(1)

#define CFG_1A_REG			0x1A
#define TEMP_MONITOR_EN_BIT		BIT(6)
#define HOT_SOFT_VFLOAT_COMP_EN_BIT	BIT(3)
#define COLD_SOFT_VFLOAT_COMP_EN_BIT	BIT(2)
#define HOT_SOFT_CURRENT_COMP_EN_BIT	BIT(1)
@@ -1814,6 +1815,15 @@ static int smb135x_parallel_set_chg_present(struct smb135x_chg *chip,
			return rc;
		}

		/* disable thermal monitoring for parallel-charger */
		rc = smb135x_masked_write(chip, CFG_1A_REG,
					TEMP_MONITOR_EN_BIT, 0);
		if (rc < 0) {
			dev_err(chip->dev,
				"Couldn't disable temp-monitor rc=%d\n", rc);
			return rc;
		}

		/* set the float voltage */
		if (chip->vfloat_mv != -EINVAL) {
			rc = smb135x_float_voltage_set(chip, chip->vfloat_mv);