ChromeOS Commit Bot has submitted this change and it was merged.
Change subject: Modify battery cutoff command
......................................................................
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...@quantatw.com>
Reviewed-on:
https://chromium-review.googlesource.com/272130
Tested-by: Grace Kao <
grac...@intel.com>
Reviewed-by: David Wu <
davi...@quantatw.com>
Commit-Queue: David Wu <
davi...@quantatw.com>
Reviewed-by: Mohammed Habibulla <
mo...@google.com>
---
M board/gandof/battery.c
M board/gandof/board.h
2 files changed, 2 insertions(+), 17 deletions(-)
Approvals:
Grace Kao: Verified
David Wu: Looks good to me, but someone else must approve; Ready
Mohammed Habibulla: Looks good to me, approved
diff --git a/board/gandof/battery.c b/board/gandof/battery.c
index 871c590..3ad5f2d 100644
--- a/board/gandof/battery.c
+++ b/board/gandof/battery.c
@@ -71,7 +71,7 @@
}
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 @@
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 15d069f..cecec4e 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
--
To view, visit
https://chromium-review.googlesource.com/272130
To unsubscribe, visit
https://chromium-review.googlesource.com/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0d670a4577f499a1a52f2969c625640c5b7c3856
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/platform/ec
Gerrit-Branch: firmware-auron-6301.B
Gerrit-Owner: 志偉 黃 <
David...@quantatw.com>
Gerrit-Reviewer: Bernie Thompson <
bhtho...@chromium.org>
Gerrit-Reviewer: ChromeOS Commit Bot <
chromeos-...@chromium.org>
Gerrit-Reviewer: David Wu <
davi...@quantatw.com>
Gerrit-Reviewer: Grace Kao <
grac...@intel.com>
Gerrit-Reviewer: Mohammed Habibulla <
mo...@google.com>
Gerrit-Reviewer: Saurabh Madan <
ssm...@chromium.org>
Gerrit-Reviewer: Shawn N <
sha...@chromium.org>