mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
power: rk817-battery: fix ydsoc calculate error
ydsoc error can lead to charge or discharge become slow. Signed-off-by: Shunqing Chen <csq@rock-chips.com> Change-Id: Ie17f0064eda3723378f49caef08bca212c322d70
This commit is contained in:
@@ -2424,7 +2424,7 @@ static void rk817_bat_smooth_algorithm(struct rk817_battery_device *battery)
|
||||
}
|
||||
|
||||
/* discharge: sm_linek < 0, if delate_cap <0, ydsoc > 0 */
|
||||
ydsoc = battery->sm_linek * abs(delta_cap / DIV(battery->fcc)) / 10;
|
||||
ydsoc = battery->sm_linek * abs(delta_cap / 10) / DIV(battery->fcc);
|
||||
|
||||
DBG("smooth: ydsoc = %d, fcc = %d\n", ydsoc, battery->fcc);
|
||||
if (ydsoc == 0) {
|
||||
|
||||
Reference in New Issue
Block a user