summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorHyongbin Kim <hyongbink@nvidia.com>2013-07-08 11:51:36 +0900
committerGabby Lee <galee@nvidia.com>2013-10-13 17:12:59 -0700
commit0d5fb6ebc72e71fa6171b393d0ce2871f0b53afe (patch)
treeb9b7ae744fee1519db739e8ecf7ce46f57872877 /drivers/power
parent138fc7ac28091ef2eacc16a38deacec09d1c4bb6 (diff)
power: max17048: fix show charging icon state
When SOC is over 100%, charging notification icon is displayed even it is not charging state. Bug 1320635 Change-Id: I4edaf618578259b8328fd9c537fe714a608c9d83 Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com> Reviewed-on: http://git-master/r/245960 (cherry picked from commit fc3444fa98ddd15ed58f3b4aabdaf0f637320368) Reviewed-on: http://git-master/r/289132 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Gabby Lee <galee@nvidia.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max17048_battery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/max17048_battery.c b/drivers/power/max17048_battery.c
index e1f803cfef09..399078515e4d 100644
--- a/drivers/power/max17048_battery.c
+++ b/drivers/power/max17048_battery.c
@@ -248,7 +248,8 @@ static void max17048_get_soc(struct i2c_client *client)
chip->soc = chip->internal_soc;
if (chip->internal_soc >= MAX17048_BATTERY_FULL) {
- chip->status = POWER_SUPPLY_STATUS_FULL;
+ if (chip->status == POWER_SUPPLY_STATUS_CHARGING)
+ chip->status = POWER_SUPPLY_STATUS_FULL;
chip->soc = MAX17048_BATTERY_FULL;
chip->capacity_level = POWER_SUPPLY_CAPACITY_LEVEL_FULL;
chip->health = POWER_SUPPLY_HEALTH_GOOD;