OSDN Git Service

qpnp-fg-gen3: Fix empty SOC handling
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Thu, 10 Nov 2016 00:40:27 +0000 (16:40 -0800)
committerSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Thu, 10 Nov 2016 20:14:50 +0000 (12:14 -0800)
commit361a315fe3557a88de665ff33b4233e429a12e3f
tree2c8f645795172cd1e438295ac07b8e43d50172b5
parentbc17be09dac840cd3d0e00c8bf70e749080908d8
qpnp-fg-gen3: Fix empty SOC handling

Currently, a flag is set when the empty SOC interrupt fires to
indicate SOC 0 to the users. This is not cleared when the battery
voltage goes up. This needs to be fixed. Remove the flag and use
the realtime status of BATT_SOC peripheral to decide it. To make
that even more robust, validate the battery voltage with the
cutoff voltage. While at it, add a print in the driver's probe to
print the battery SOC and voltage. This will be helpful to debug
different battery charging scenarios.

CRs-Fixed: 1086715
Change-Id: Icbbe0d4ab74c6f9bf6f2278a11020a9bc6c41930
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
drivers/power/qcom-charger/fg-core.h
drivers/power/qcom-charger/fg-memif.c
drivers/power/qcom-charger/fg-reg.h
drivers/power/qcom-charger/qpnp-fg-gen3.c