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

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

power: qpnp-smbcharger: Fix the BMD algo. disable logic



The battery missing detection (BMD) is incorrectly
being enabled. Fix it.

CRs-Fixed: 943881
Change-Id: I58407f0b6ca376bc4809073144429cd4cc3483c9
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent db9b80a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6857,7 +6857,7 @@ static int smbchg_hw_init(struct smbchg_chip *chip)

	/* battery missing detection */
	mask =  BATT_MISSING_ALGO_BIT;
	reg = chip->bmd_algo_disabled ? BATT_MISSING_ALGO_BIT : 0;
	reg = chip->bmd_algo_disabled ? 0 : BATT_MISSING_ALGO_BIT;
	if (chip->bmd_pin_src < BPD_TYPE_DEFAULT) {
		mask |= BMD_PIN_SRC_MASK;
		reg |= chip->bmd_pin_src << PIN_SRC_SHIFT;