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

Commit dd85cf2a authored by Anirudh Ghayal's avatar Anirudh Ghayal Committed by Gerrit - the friendly Code Review server
Browse files

power: smb1360: Do not configure BAT_ID fail configuration



If the batt_id is disabled, do not configure the batt_id
fail configuration as this could cause a battery profile
switch.

CRs-Fixed: 783017
Change-Id: I4dd1689d91d1c6b8fd9d17f241a65572e69461bc
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent 33435fe4
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3675,9 +3675,8 @@ static int smb1360_hw_init(struct smb1360_chip *chip)

	/* batt-id configuration */
	if (chip->batt_id_disabled) {
		mask = BATT_ID_ENABLED_BIT | CHG_BATT_ID_FAIL
				| BATT_ID_FAIL_SELECT_PROFILE;
		reg = CHG_BATT_ID_FAIL | BATT_ID_FAIL_SELECT_PROFILE;
		mask = BATT_ID_ENABLED_BIT | CHG_BATT_ID_FAIL;
		reg = CHG_BATT_ID_FAIL;
		rc = smb1360_masked_write(chip, CFG_FG_BATT_CTRL_REG,
						mask, reg);
		if (rc < 0) {