summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorHyongbin Kim <hyongbink@nvidia.com>2013-10-14 14:48:55 +0900
committerGabby Lee <galee@nvidia.com>2013-10-15 01:44:52 -0700
commit1aa792d601dcc436e05d8d10033b714ee129a474 (patch)
treef7b9710827a8253c602cea331a93be2b328e7d98 /drivers/power
parent8a085cfdf5e596fb561f54eb54c334fa21245978 (diff)
max17048: update temp change promptly
When battery temperature is changed over 1.5C or over hot/cold threshold, update power supply for sending event to framwork. Bug 1386890 Change-Id: I72ecda41b339a07a467ca31950643fb45b21b7d9 Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com> Reviewed-on: http://git-master/r/298845 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, 3 insertions, 0 deletions
diff --git a/drivers/power/max17048_battery.c b/drivers/power/max17048_battery.c
index 8345dc7b14a6..e470d9161ac6 100644
--- a/drivers/power/max17048_battery.c
+++ b/drivers/power/max17048_battery.c
@@ -454,6 +454,7 @@ static void max17048_work(struct work_struct *work)
__func__, chip->temperature / 1000);
chip->lasttime_temperature = chip->temperature;
max17048_update_rcomp(chip, chip->temperature);
+ power_supply_changed(&chip->battery);
}
max17048_get_vcell(chip->client);
@@ -465,10 +466,12 @@ static void max17048_work(struct work_struct *work)
chip->health = POWER_SUPPLY_HEALTH_OVERHEAT;
dev_info(&chip->client->dev, "%s: BATTERY HOT, Temp %ldC\n",
__func__, chip->temperature / 1000);
+ power_supply_changed(&chip->battery);
} else if (chip->temperature < MAX17048_BATTERY_COLD) {
dev_info(&chip->client->dev, "%s: BATTERY COLD, Temp %ldC\n",
__func__, chip->temperature / 1000);
chip->health = POWER_SUPPLY_HEALTH_COLD;
+ power_supply_changed(&chip->battery);
}
if (chip->soc != chip->lasttime_soc ||