aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-wrapper.py
diff options
context:
space:
mode:
authorXiaozhe Shi <xiaozhes@codeaurora.org>2014-02-04 13:25:38 -0800
committerXiaozhe Shi <xiaozhes@codeaurora.org>2014-02-04 14:26:06 -0800
commite50d0dc3660d92e56594e1a1bc93aa1797d93e1f (patch)
tree44832fd506b910a5268a7fe7fe0dc5f173b227a3 /scripts/gcc-wrapper.py
parent235cd46bba7e94754d32439238f61a9b730c674a (diff)
power: qpnp-bms: estimate OCVs based on temperature
The BMS driver will throw out the hardware taken open circuit voltage (OCV) if there has been a warm reset and the PMIC did not go through the power on sequence. This is to throw out the stale OCVs from the last boot. However, if there is no shutdown SOC stored, the BMS driver must estimate an OCV. When estimating an OCV, there is no information about the battery state of charge yet, so the default battery resistance is used to do the estimation. However, this only works in cases where the battery temperature is not cold. When the battery temperature is cold, the real rbatt will be much larger than the default rbatt. If the default rbatt is used, the estimated OCV will most likely be much too low, and a faulty SOC will be used. This issue is exacerbated by the fact that the shutdown SOC is thrown out when the battery is cold, so this situation can arise much more frequently. Fix this by estimating the battery OCV based on temperature and just using a default rbatt SOC of 50%. Change-Id: Ibc89fcd74a295bb2196be2d8c977e8b1b8598d7a Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Diffstat (limited to 'scripts/gcc-wrapper.py')
0 files changed, 0 insertions, 0 deletions