Skip to content

Commit

Permalink
charger-manager: Fix bug when check dropped voltage after fullbatt event
Browse files Browse the repository at this point in the history
This patch check difference value between current voltage of battery and
desc->fullbatt_uV whether positve or negative number. If difference value
is negative number when current voltage of battery is larger than
desc->fullbatt_uV, charger-manager return immediately because battery is
fully charged.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
  • Loading branch information
Chanwoo Choi authored and Anton Vorontsov committed Dec 17, 2012
1 parent 0fa11db commit f36b9dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/power/charger-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,9 @@ static void fullbatt_vchk(struct work_struct *work)
return;
}

diff = desc->fullbatt_uV;
diff -= batt_uV;
diff = desc->fullbatt_uV - batt_uV;
if (diff < 0)
return;

dev_info(cm->dev, "VBATT dropped %duV after full-batt.\n", diff);

Expand Down

0 comments on commit f36b9dd

Please sign in to comment.