OSDN Git Service

power: qpnp-fg-gen3: Handle notifications from parallel charger
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Wed, 4 Oct 2017 03:34:38 +0000 (20:34 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Thu, 5 Oct 2017 18:00:57 +0000 (11:00 -0700)
Handle notifications from parallel charger in GEN3 FG driver so
that ESR FCC control can be configured sooner based on parallel
charging status change. Without this, GEN3 FG driver can simply
wait on notifications from battery/USB power supply to move from
HW autonomous to SW controlled ESR FCC settings when parallel
charging is enabled which cause unwanted battery current spikes.

CRs-Fixed: 2119134
Change-Id: Ic4c473a6cc6062f2eaaebc68c30a1a51763c5dda
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
drivers/power/supply/qcom/qpnp-fg-gen3.c

index ea01a38..79a80b6 100644 (file)
@@ -3727,6 +3727,7 @@ static int fg_notifier_cb(struct notifier_block *nb,
                return NOTIFY_OK;
 
        if ((strcmp(psy->desc->name, "battery") == 0)
+               || (strcmp(psy->desc->name, "parallel") == 0)
                || (strcmp(psy->desc->name, "usb") == 0)) {
                /*
                 * We cannot vote for awake votable here as that takes