summaryrefslogtreecommitdiff
path: root/board/scarlet/board.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2017-12-22 15:57:06 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-04 21:52:01 -0800
commit6bbb5adab171d473f38f1ad9f8f0a1dafff30146 (patch)
tree35d1930249e0a5f147db152220a35d733b3181d8 /board/scarlet/board.h
parent41af1bf27c0e983523a055d2567bc15e7814e289 (diff)
downloadchrome-ec-6bbb5adab171d473f38f1ad9f8f0a1dafff30146.tar.gz
charge_state_v2: Add charge_set_output_current_limit function
This function sets up and enables "OTG" mode on the charger chip (i.e. use the charger to provide power from the battery). It also records the output current in curr.output_current, to make sure that the charger loop is aware that current is provided externally. We also add a CONFIG_CHARGER_OTG to remove these functions on boards that do not require it. BRANCH=none BUG=b:65697962 TEST=On wand, when discharging, battery status is updated every 5 seconds (and not every 60 seconds). Change-Id: Ibf93933436f3eb24552a8e1eb9d97522fca2ce79 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/842743 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/scarlet/board.h')
-rw-r--r--board/scarlet/board.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/scarlet/board.h b/board/scarlet/board.h
index f18d25df86..6c3478cdaf 100644
--- a/board/scarlet/board.h
+++ b/board/scarlet/board.h
@@ -78,6 +78,7 @@
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 15000
#define CONFIG_CHARGER_PROFILE_OVERRIDE
#define CONFIG_CHARGER_DISCHARGE_ON_AC
+#define CONFIG_CHARGER_OTG
#define CONFIG_USB_MUX_VIRTUAL
/* Increase tx buffer size, as we'd like to stream EC log to AP. */