power: qpnp-bms: Refactor loading shutdown data
Currently the BMS performs multiple checks of the shutdown state of
charge (SoC) and shutdown average current (IAVG) in order to
determine whether to use the historic data saved during the previous
power cycle.
However, because the logic for shutdown SoC and IAVG invalidation is
scattered around the BMS driver, it is difficult to debug the
conditions of shutdown data invalidation.
Refactor how shutdown data is loaded so that it makes the criteria
of shutdown data invalidation clear to the reader.
Change-Id: I77e06d70671b8fde4abf49daa6c25cb910fd97d2
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment