summaryrefslogtreecommitdiff
path: root/include/charge_state_v2.h
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-05-31 11:19:41 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-06-01 17:44:41 -0700
commit32255f2989a2087479c0a0f440290ce1efc3e4f4 (patch)
tree33cf653a77fcce3a9b11365bd32df2a6b45fa357 /include/charge_state_v2.h
parenta011b79bfb73e121fc86da7e6d448161dab9fa91 (diff)
downloadchrome-ec-32255f2989a2087479c0a0f440290ce1efc3e4f4.tar.gz
chgstv2: Fix manual control via EC console.
There was a recent change to save the manual setting of charge current and voltage, however it was done so assuming that the parameters were set via the host command interface. (CL:922069) However, there are times where the charge voltage/current would like to be manipulated without booting the AP. This commit simply makes the EC console command work again. BUG=None BRANCH=None TEST=make -j buildall TEST=Flash nocturne, `chgstate idle on; charger current 256; charger voltage 7400`; verify that the charge voltage and current is actually changed. Change-Id: Id250d9704f8509162518495556603950248fb267 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/1081120 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'include/charge_state_v2.h')
-rw-r--r--include/charge_state_v2.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/charge_state_v2.h b/include/charge_state_v2.h
index 69809f4b73..0819a0ea66 100644
--- a/include/charge_state_v2.h
+++ b/include/charge_state_v2.h
@@ -79,6 +79,20 @@ int charge_get_charge_state_debug(int param, uint32_t *value);
#endif /* CONFIG_CHARGE_STATE_DEBUG */
/**
+ * Set the desired manual charge current when in idle mode.
+ *
+ * @param curr_ma: Charge current in mA.
+ */
+void chgstate_set_manual_current(int curr_ma);
+
+/**
+ * Set the desired manual charge voltage when in idle mode.
+ *
+ * @param volt_mv: Charge voltage in mV.
+ */
+void chgstate_set_manual_voltage(int volt_mv);
+
+/**
* Board-specific routine to indicate if the base is connected.
*/
int board_is_base_connected(void);