diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-04-04 09:10:14 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-05 01:42:21 +0000 |
commit | f06ad7e2ab4fa1a03c2e48a8bca3fdf2abbdffa9 (patch) | |
tree | 96cbbda28b09d2ac48199ae39ad91c2c8fd47eb0 /common/charge_state_v1.c | |
parent | 3e1db94ea03e43c37a165a5dd2f1693a54dbfefd (diff) | |
download | chrome-ec-f06ad7e2ab4fa1a03c2e48a8bca3fdf2abbdffa9.tar.gz |
Add host command to control charge state v2
This replaces the obsolete and temporary (ha!) EC_CMD_CHARGE_DUMP host
command with EC_CMD_CHARGE_STATE. This is used to monitor and adjust the new
charge state implementation, including any board-specific customizations.
This command is a single catch-all command with multiple subcommands
(similar to EC_CMD_LIGHTBAR_CMD) so that we don't have to keep adding new
top-level host commands just to support incremental changes.
BUG=chrome-os-partner:23776
BRANCH=ToT
TEST=manual
From the AP, try these commands:
ectool chargestate show
ectool chargestate param
ectool chargestate param <NUM>
ectool chargestate param <NUM> <VALUE>
Watch the EC console and use its "chg" command to verify the effects of
setting various params.
Note: the Samus-specific fast-charging profile override is param 0x10000.
You can check it with the EC console "fastcharge" command.
Change-Id: Iad2f773a085bc25c05073b3eed9866f122ae9d78
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193305
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/charge_state_v1.c')
-rw-r--r-- | common/charge_state_v1.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/common/charge_state_v1.c b/common/charge_state_v1.c index d08aa2430b..1de56e34fa 100644 --- a/common/charge_state_v1.c +++ b/common/charge_state_v1.c @@ -979,23 +979,6 @@ static int charge_command_charge_control(struct host_cmd_handler_args *args) DECLARE_HOST_COMMAND(EC_CMD_CHARGE_CONTROL, charge_command_charge_control, EC_VER_MASK(0) | EC_VER_MASK(1)); -static int charge_command_dump(struct host_cmd_handler_args *args) -{ - char *dest = (char *)args->response; - - if (system_is_locked()) - return EC_RES_ACCESS_DENIED; - - ASSERT(sizeof(task_ctx) <= args->response_max); - - memcpy(dest, &task_ctx, sizeof(task_ctx)); - args->response_size = sizeof(task_ctx); - - return EC_RES_SUCCESS; -} -DECLARE_HOST_COMMAND(EC_CMD_CHARGE_DUMP, charge_command_dump, - EC_VER_MASK(0)); - static void reset_current_limit(void) { user_current_limit = -1; |