power: supply: rk817_battery: Refactor code and update state-of-charge algorithm

This algorithm dynamically estimates a battery's total dischargeable
capacity by correlating real-time internal resistance (measured at
cutoff voltage) with instantaneous current under varying operational
conditions. To account for temperature-dependent resistance
characteristics, the method implements a worst-caseselection protocol:
comparing the measured internal resistance against the
room-temperaturereference value (25°C cutoff threshold) and adopting
the higher resistance value for capacity computation.

Change-Id: I6c00091a76753c707ca8d0043791173db56d5a41
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
This commit is contained in:
Shengfei Xu
2025-03-28 14:46:21 +08:00
committed by Tao Huang
parent 8617d03e81
commit e5db0686ad

File diff suppressed because it is too large Load Diff