summaryrefslogtreecommitdiff
path: root/include/charge_state_v2.h
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-04-04 09:10:14 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-04-05 01:42:21 +0000
commitf06ad7e2ab4fa1a03c2e48a8bca3fdf2abbdffa9 (patch)
tree96cbbda28b09d2ac48199ae39ad91c2c8fd47eb0 /include/charge_state_v2.h
parent3e1db94ea03e43c37a165a5dd2f1693a54dbfefd (diff)
downloadchrome-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 'include/charge_state_v2.h')
-rw-r--r--include/charge_state_v2.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/charge_state_v2.h b/include/charge_state_v2.h
index 16d8ee61ad..7f2015dc74 100644
--- a/include/charge_state_v2.h
+++ b/include/charge_state_v2.h
@@ -48,5 +48,14 @@ struct charge_state_data {
*/
int charger_profile_override(struct charge_state_data *);
+/*
+ * Access to custom profile params through host commands.
+ * What this does is up to the implementation.
+ */
+enum ec_status charger_profile_override_get_param(uint32_t param,
+ uint32_t *value);
+enum ec_status charger_profile_override_set_param(uint32_t param,
+ uint32_t value);
+
#endif /* __CROS_EC_CHARGE_STATE_V2_H */