summaryrefslogtreecommitdiff
path: root/board/samus/extpower.c
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-02-27 13:36:53 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-28 03:46:30 +0000
commit8fe9304ae24d736698f8c7d02b299b8c815de91f (patch)
tree889ffd575683f3b600853a679c0ef21bf7908131 /board/samus/extpower.c
parent9bdbc71c455ccc11c98892f44ebc7a629ae341e2 (diff)
downloadchrome-ec-8fe9304ae24d736698f8c7d02b299b8c815de91f.tar.gz
samus: don't unwedge charging when purposely discharging on AC
For factory testing, when purposely discharging on AC, don't automatically detect and unwedged charge circuit. BUG=chrome-os-partner:37171 BRANCH=samus TEST=plug in AC and run: "ectool chargecontrol discharge". check on ec console that battery is discharging. let sit for 3 minutes and make sure charge circuit unwedge code never runs. run "ectool chargecontrol normal" and make sure battery starts charging again. Also force discharge with "ectool chargecontrol discharge" and then unplug and replug AC, make sure battery is not charging nor discharging, then set mode back to normal and make sure we start charging again. Tested without this CL and everytime you force discharge the charge unwedge is activated and messes everything up. Change-Id: Icc7a504c148e1e08777e7aafce64ff4cc38a32c5 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/254722 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'board/samus/extpower.c')
-rw-r--r--board/samus/extpower.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/board/samus/extpower.c b/board/samus/extpower.c
index 8a73c91a56..b842f7d3ea 100644
--- a/board/samus/extpower.c
+++ b/board/samus/extpower.c
@@ -398,8 +398,12 @@ void extpower_task(void)
while (1) {
if (task_wait_event(CHARGE_WEDGE_CHECK_INTERVAL) ==
TASK_EVENT_TIMER) {
- /* Periodically check if charge circuit is wedged */
- check_charge_wedged();
+ /*
+ * If we are NOT purposely discharging on AC, then
+ * periodically check if charge circuit is wedged.
+ */
+ if (!board_is_discharging_on_ac())
+ check_charge_wedged();
} else {
/* Must have received power change interrupt */
extpower = extpower_is_present();