Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 30ab744d authored by Xiaozhe Shi's avatar Xiaozhe Shi
Browse files

power: qpnp-bms: Allow SOC Storage register to be configured



Currently the BMS driver stores the shutdown state of charge (SoC) in
BMS data register 0 (0x40B0). This register is DVDD backed, which is
reset upon battery removal.

However in some cases, the BMS driver needs to be able to keep the
shutdown SoC data through a battery replacement that resets the DVDD
backed registers. In these cases, a spare XVDD coincell backed
register should be used.

Add the capability to configure the BMS driver to use different
registers via the device tree. If a node is provided with a custom
SOC storage register address, that register will used instead of the
BMS data register 0.

Additionally, change how shutdown SoC is stored so that both 0x00
and 0xFF register reset states are considered invalid SoCs to
accomodate this change.

Change-Id: I3b11db734227c50c71bcfc824d6d26670e99d23f
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent 3dc1eb32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment