Currently, recharge SOC is adjusted based on the SOC at which
charge termination occurs. However, it gets reset back to the
original threshold only if input is removed. This does not work
well if charging resumes again once the battery is out of JEITA
as the recharge SOC threshold stays configured at a lower value.
Fix it by adjusting recharge SOC to the original threshold once
charging begins.
CRs-Fixed:
2163058
Change-Id: I07c714d32ba0005d3b0ff61142928eda58f049d0
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
return 0;
}
} else {
- /* Charging, do nothing */
- return 0;
+ if (!chip->recharge_soc_adjusted)
+ return 0;
+
+ /* Restore the default value */
+ new_recharge_soc = recharge_soc;
+ chip->recharge_soc_adjusted = false;
}
} else {
/* Restore the default value */