diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2014-04-18 14:58:10 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-18 21:32:57 +0000 |
commit | 35b214c1b3559d97663a3c3eecdab7689b29255a (patch) | |
tree | 7f20dc0ccbef289c4426d0d384bc2406de31a57b | |
parent | 2e41eb9eb9e9b816a12e58a42fb9b2a2ceeb8a36 (diff) | |
download | chrome-ec-35b214c1b3559d97663a3c3eecdab7689b29255a.tar.gz |
blaze: add ectool discharge command
just picks up this commmand for factory.
BRANCH=ToT
BUG=None
TEST=Run ectool chargecontrol command with each option (normal,
idle, discharge) on blaze. Verifiy battery can discharge.
Change-Id: Id57b42796a26aaf85258048260d06923b78f0773
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Yung-chieh Lo <yjlou@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/195535
-rw-r--r-- | board/blaze/board.c | 9 | ||||
-rw-r--r-- | board/blaze/board.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/board/blaze/board.c b/board/blaze/board.c index c46161a7bc..b7978013c7 100644 --- a/board/blaze/board.c +++ b/board/blaze/board.c @@ -22,6 +22,7 @@ #include "task.h" #include "util.h" #include "timer.h" +#include "charger.h" #define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH) #define GPIO_KB_OUTPUT GPIO_ODR_HIGH @@ -117,3 +118,11 @@ const struct pwm_t pwm_channels[] = { PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L}, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); + +/** + * Discharge battery when on AC power for factory test. + */ +int board_discharge_on_ac(int enable) +{ + return charger_discharge_on_ac(enable); +} diff --git a/board/blaze/board.h b/board/blaze/board.h index f6c23dfe74..3a4fdcff5e 100644 --- a/board/blaze/board.h +++ b/board/blaze/board.h @@ -25,6 +25,7 @@ #define CONFIG_POWER_BUTTON #define CONFIG_VBOOT_HASH #define CONFIG_LED_COMMON +#define CONFIG_CHARGER_DISCHARGE_ON_AC #ifndef __ASSEMBLER__ @@ -116,6 +117,9 @@ enum pwm_channel { #define CONFIG_CHARGER_INPUT_CURRENT 4032 /* mA, based on Link HW design */ #define CONFIG_CHARGER_CURRENT_LIMIT 3000 /* PL102 inductor 3.0A(3.8A) */ +/* Discharge battery when on AC power for factory test. */ +int board_discharge_on_ac(int enable); + #endif /* !__ASSEMBLER__ */ #endif /* __BOARD_H */ |