From 6bbb5adab171d473f38f1ad9f8f0a1dafff30146 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Fri, 22 Dec 2017 15:57:06 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/842743 Reviewed-by: Randall Spangler --- board/hammer/board.h | 1 + 1 file changed, 1 insertion(+) (limited to 'board/hammer/board.h') diff --git a/board/hammer/board.h b/board/hammer/board.h index 0b04ced2cd..5d3d191095 100644 --- a/board/hammer/board.h +++ b/board/hammer/board.h @@ -229,6 +229,7 @@ #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 #define CONFIG_CHARGER_DISCHARGE_ON_AC +#define CONFIG_CHARGER_OTG #define CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF #define CONFIG_BATTERY_CUT_OFF -- cgit v1.2.1