summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Huang <David.Huang@quantatw.com>2015-05-19 18:18:13 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-20 08:31:30 +0000
commitced78ca377d1703189cd2a156a86983449f56975 (patch)
tree73c08ba8f908bf08f9e0a8a8e776252d4041ac08
parentb728ab96e383f7f7cb3fdf0b7d8b2c8979c00c73 (diff)
downloadchrome-ec-ced78ca377d1703189cd2a156a86983449f56975.tar.gz
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 <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/272130 Tested-by: Grace Kao <grace.kao@intel.com> Reviewed-by: David Wu <david_wu@quantatw.com> Commit-Queue: David Wu <david_wu@quantatw.com> Reviewed-by: Mohammed Habibulla <moch@google.com>
-rw-r--r--board/gandof/battery.c18
-rw-r--r--board/gandof/board.h1
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