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: Anirudh Ghayal <aghayal@codeaurora.org>
This commit is contained in:
Anirudh Ghayal 2016-01-15 19:02:44 +05:30 committed by David Keitel
parent d19001685d
commit 038d3f7c39

View file

@ -6844,7 +6844,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;