From b4e4354ff3ece05f514b8af2ef22d1de87db16df Mon Sep 17 00:00:00 2001 From: David Keitel Date: Tue, 9 Apr 2013 17:30:41 -0700 Subject: [PATCH] power: qpnp-charger: do not disable COMP_EN The IBAT_TERM comparator is also used by the VCP control block. If one disables this comparator VCP is terminated and this can cause UVLO resets. Fix this by not disabling the IBAT_TERM comparator. Also, disable the digital end of charge functionality in the charger hardware which is currently facing accuracy issues. Instead switch to analog end of charge, which does not exhibit this behaviour. CRs-Fixed: 471945 Change-Id: I5d43ea2ce6b2a7325effa87d3f7dca05161a9d56 Signed-off-by: David Keitel --- drivers/power/qpnp-charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/qpnp-charger.c b/drivers/power/qpnp-charger.c index 3bf91e8c57b..a875c925c0d 100644 --- a/drivers/power/qpnp-charger.c +++ b/drivers/power/qpnp-charger.c @@ -1683,10 +1683,10 @@ qpnp_chg_hwinit(struct qpnp_chg_chip *chip, u8 subtype, rc = qpnp_chg_masked_write(chip, chip->chgr_base + 0x62, 0xFF, 0xA0, 1); - /* HACK: use digital EOC */ + /* HACK: use analog EOC */ rc = qpnp_chg_masked_write(chip, chip->chgr_base + CHGR_IBAT_TERM_CHGR, - 0x88, 0x80, 1); + 0x80, 0x00, 1); break; case SMBB_BUCK_SUBTYPE: