From 3bdf5b615b8a27f516b68f644231b26389669a08 Mon Sep 17 00:00:00 2001 From: UncleMac Date: Mon, 29 Apr 2019 16:34:48 +0800 Subject: [PATCH] fixup rk817_bat_fake_finish_mode rsoc need divided by 1000 --- drivers/power/rk817_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/rk817_battery.c b/drivers/power/rk817_battery.c index 386968a528939..6ab2708ea3188 100644 --- a/drivers/power/rk817_battery.c +++ b/drivers/power/rk817_battery.c @@ -1412,7 +1412,7 @@ static int rk817_bat_get_charge_status(struct rk817_battery_device *battery) */ static bool rk817_bat_fake_finish_mode(struct rk817_battery_device *battery) { - if ((battery->rsoc == 100) && + if ((battery->rsoc/1000 == 100) && (rk817_bat_get_charge_status(battery) == CC_OR_CV_CHRG) && (abs(battery->current_avg) <= 100)) return true;