aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnirudh Ghayal <aghayal@codeaurora.org>2020-05-14 21:33:33 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2020-05-18 00:53:18 -0700
commitf948f51813f1398af774f83767271ba17ea8be9e (patch)
tree380f50f3c1a1eacf6d885572f400764ebc34ded4
parent37ff6dd39c3e1d533db93415c867570ff724a2a9 (diff)
power: smb5-lib: Use the unlocked version votable for FVLA.UM.8.12.r1-11300-sm8250.0
Float voltage is read in the batt_health() callback. batt_health() is called from batt_status() and batt_status() is also called from the FV callback leading to a deadlock. Fix it by using the unlocked version of votable while reading FV. Change-Id: Ie6f9f683c048a2a1c64d46716433bcff359dc3b0 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
-rw-r--r--drivers/power/supply/qcom/smb5-lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/supply/qcom/smb5-lib.c b/drivers/power/supply/qcom/smb5-lib.c
index 9cdd1e6522ee..7d0ec5b1e985 100644
--- a/drivers/power/supply/qcom/smb5-lib.c
+++ b/drivers/power/supply/qcom/smb5-lib.c
@@ -2177,7 +2177,8 @@ int smblib_get_prop_batt_health(struct smb_charger *chg,
* If Vbatt is within 40mV above Vfloat, then don't
* treat it as overvoltage.
*/
- effective_fv_uv = get_effective_result(chg->fv_votable);
+ effective_fv_uv = get_effective_result_locked(
+ chg->fv_votable);
if (pval.intval >= effective_fv_uv + 40000) {
val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE;
smblib_err(chg, "battery over-voltage vbat_fg = %duV, fv = %duV\n",