summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorYongBeum Ha <ybha@samsung.com>2019-07-25 03:05:37 +0900
committerCommit Bot <commit-bot@chromium.org>2019-07-30 05:17:48 +0000
commitf911ddd9d425c2159d21758ba9eb05051180969a (patch)
tree33338dee20e2f4c5fc76d476b2a9278e8014fdaf /board
parentbc332be9f1fb6e6cc607f80aa8d4a6ddb099b41c (diff)
downloadchrome-ec-f911ddd9d425c2159d21758ba9eb05051180969a.tar.gz
casta & bluebird : make charge state to ST_DISCHARGE
charge_profile_override() changes charge state from ST_DISCHARGE to ST_IDLE on overtemperature condition. This makes led color to green when there is no adapter. This CL skip changing charge state when charge state is ST_DISCHARGE. BUG=b:138268383 BRANCH=None TEST=None Change-Id: I581a42641cf6632657b8e19ab41b532805024d9e Signed-off-by: YongBeum Ha <ybha@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1715952 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/casta/battery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/casta/battery.c b/board/casta/battery.c
index abed3481ef..965db28395 100644
--- a/board/casta/battery.c
+++ b/board/casta/battery.c
@@ -138,7 +138,8 @@ int charger_profile_override(struct charge_state_data *curr)
current = 0;
voltage = 0;
curr->batt.flags &= ~BATT_FLAG_WANT_CHARGE;
- curr->state = ST_IDLE;
+ if (curr->state != ST_DISCHARGE)
+ curr->state = ST_IDLE;
break;
}