From ced78ca377d1703189cd2a156a86983449f56975 Mon Sep 17 00:00:00 2001 From: David Huang Date: Tue, 19 May 2015 18:18:13 +0800 Subject: Modify battery cutoff command Modify battery cutoff command BRANCH=gandof BUG=chrome-os-partner:40077 TEST=Use "ectool batterycutoff at-shutdown" to check power off DC mode can't be power on. Change-Id: I0d670a4577f499a1a52f2969c625640c5b7c3856 Signed-off-by: David Huang Reviewed-on: https://chromium-review.googlesource.com/272130 Tested-by: Grace Kao Reviewed-by: David Wu Commit-Queue: David Wu Reviewed-by: Mohammed Habibulla --- board/gandof/battery.c | 18 +----------------- board/gandof/board.h | 1 + 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/board/gandof/battery.c b/board/gandof/battery.c index 871c590112..3ad5f2d804 100644 --- a/board/gandof/battery.c +++ b/board/gandof/battery.c @@ -71,7 +71,7 @@ static void wakeup(void) } DECLARE_HOOK(HOOK_INIT, wakeup, HOOK_PRIO_DEFAULT); -static int cutoff(void) +int board_cut_off_battery(void) { int rv, tmp, cell_voltage; @@ -114,19 +114,3 @@ static int cutoff(void) return EC_ERROR_UNKNOWN; } - -static int battery_command_cut_off(struct host_cmd_handler_args *args) -{ - return cutoff() ? EC_RES_ERROR : EC_RES_SUCCESS; -} -DECLARE_HOST_COMMAND(EC_CMD_BATTERY_CUT_OFF, battery_command_cut_off, - EC_VER_MASK(0)); - -static int command_battcutoff(int argc, char **argv) -{ - return cutoff(); -} -DECLARE_CONSOLE_COMMAND(battcutoff, command_battcutoff, - NULL, - "Enable battery cutoff (ship mode)", - NULL); diff --git a/board/gandof/board.h b/board/gandof/board.h index 15d069f82c..cecec4e0c5 100644 --- a/board/gandof/board.h +++ b/board/gandof/board.h @@ -11,6 +11,7 @@ /* Optional features */ #define CONFIG_BACKLIGHT_LID #define CONFIG_BACKLIGHT_REQ_GPIO GPIO_PCH_BKLTEN +#define CONFIG_BATTERY_CUT_OFF #define CONFIG_BATTERY_PRESENT_GPIO GPIO_BAT_PRESENT_L #define CONFIG_BATTERY_SMART #define CONFIG_BOARD_VERSION -- cgit v1.2.1