power: qpnp-bms: implement max current property

Implement POWER_SUPPLY_PROP_MAX_CURRENT in the bms power supply.
This new property will be an estimate of how much current the battery can
safely provide. It will be calculated from the delta between current
battery voltage and the cutoff voltage divided by the current battery
resistance.

This value will be updated every time SoC gets recalculated. Future uses
includes battery current limiting (BCL) and reporting.

Change-Id: Idb0e4b05fbc89b2dc2043f759efdb2312b9bc8c0
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed