diff options
author | Dave Parker <dparker@chromium.org> | 2013-07-19 23:43:28 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-22 17:57:22 -0700 |
commit | 148a6f58d469762f371c4febf5dda7e92c2607f7 (patch) | |
tree | ebd6d21a4468cfd9355f8ac90a7150d1dcf3576c | |
parent | 8218aa1346e533423d445018a289f938f36bcebd (diff) | |
download | chrome-ec-stabilize-4443.B.tar.gz |
Add ectool chargecontrol discharge command for Slippystabilize-4443.B
BUG=chrome-os-partner:21180
BRANCH=slippy
TEST=Run ectool chargecontrol command with each option (normal,
idle, discharge) on Slippy. Verifiy battery is discharging
in discharge mode via EC console 'battery' command.
Signed-off-by: Dave Parker <dparker@chromium.org>
Change-Id: I0461b20fc15c99380327b9a282efff7f1ed93baf
Reviewed-on: https://gerrit.chromium.org/gerrit/62851
-rw-r--r-- | board/slippy/board.c | 12 | ||||
-rw-r--r-- | board/slippy/board.h | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/board/slippy/board.c b/board/slippy/board.c index 69566ef404..e19cb4aeef 100644 --- a/board/slippy/board.c +++ b/board/slippy/board.c @@ -217,3 +217,15 @@ int board_g781_has_power(void) { return gpio_get_level(GPIO_PP3300_DX_EN); } + +/** + * Discharge battery when on AC power for factory test. + */ +int board_discharge_on_ac(int enable) +{ + if (enable) + gpio_set_level(GPIO_CHARGE_L, 1); + else + gpio_set_level(GPIO_CHARGE_L, 0); + return EC_SUCCESS; +} diff --git a/board/slippy/board.h b/board/slippy/board.h index 18cc4628f2..072fdf0420 100644 --- a/board/slippy/board.h +++ b/board/slippy/board.h @@ -25,6 +25,7 @@ #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_HASWELL #endif +#define CONFIG_CMD_DISCHARGE_ON_AC #define CONFIG_CUSTOM_KEYSCAN #define CONFIG_EXTPOWER_GPIO #ifdef HAS_TASK_KEYPROTO @@ -218,6 +219,9 @@ int board_g781_has_power(void); #define WIRELESS_GPIO_WWAN GPIO_PP3300_LTE_EN #define WIRELESS_GPIO_WLAN_POWER GPIO_PP3300_WLAN_EN +/* Discharge battery when on AC power for factory test. */ +int board_discharge_on_ac(int enable); + #endif /* !__ASSEMBLER__ */ #endif /* __BOARD_H */ |