power: qpnp-bms: Add voltage-based state of charge
Add an optional voltage-based SoC to the qpnp-bms driver. Add a optional
device tree property "qcom,bms-use-voltage-soc" to enable this. Add a
module param for the qpnp-bms driver to enable this feature from
userspace.
The voltage based SoC simply returns SoC based on the current battery
voltage, scaled between max_voltage and v_cutoff. This simple SoC
algorithm is useful for uncalibrated and untrimmed equipment that
require a SoC but not linearity.
Change-Id: I2d8ffc1b033ccfee7e31bc1755c6cda154fb687d
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2 files changed