diff options
author | YongBeum Ha <ybha@samsung.com> | 2019-05-10 15:06:27 +0900 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-23 02:14:44 -0700 |
commit | bd7bcb8a50da51032b73ca6b3990fc36955980e7 (patch) | |
tree | f894c0300afea94d03c577c688dce183a44daa01 | |
parent | 0ddb4813fcb6a0caf8d9248de15c2bd3d797e277 (diff) | |
download | chrome-ec-bd7bcb8a50da51032b73ca6b3990fc36955980e7.tar.gz |
casta:Do not override charge on dead battery
charger_profile_override() change charging voltage & current
as battery temperature. The flag for bad temperature is set
when battery is not responsive then the current is set to 0.
Charge doesnot charge dead battery and the battery can't wake.
Then the system can't power on with dead battery.
BUG=b:131126731
BRANCH=octopus
TEST=flash EC and check if dead battery is charged.
Change-Id: I3a46442344f89d129c4b90b0b7ceb9ffc863fbf3
Signed-off-by: YongBeum Ha <ybha@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/1605298
Tested-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
-rw-r--r-- | board/casta/battery.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/board/casta/battery.c b/board/casta/battery.c index 7cb6dff4c6..abed3481ef 100644 --- a/board/casta/battery.c +++ b/board/casta/battery.c @@ -93,6 +93,13 @@ int charger_profile_override(struct charge_state_data *curr) TEMP_OUT_OF_RANGE = TEMP_ZONE_COUNT } temp_zone; + /* + * Precharge must be executed when communication is failed on + * dead battery. + */ + if(!(curr->batt.flags & BATT_FLAG_RESPONSIVE)) + return 0; + current = curr->requested_current; voltage = curr->requested_voltage; bat_temp_c = curr->batt.temperature - 2731; |