summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-03-27 15:49:26 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-28 23:23:31 -0700
commit8fb18f174ce9aac91c5fc41ebe4b12c0aa746ba0 (patch)
tree857d5ff4896ea66a64851361dcdf16beb4a8ae68 /include
parent46b2618d72f67570a2a77711889b670aa64c6c51 (diff)
downloadchrome-ec-8fb18f174ce9aac91c5fc41ebe4b12c0aa746ba0.tar.gz
common/ec_ec_comm_master/slave: Add support for EC hibernate
Allows the lid to hibernate the base. BRANCH=none BUG=b:71874971 TEST=With following change, lid hibernates the base when in S5, and no AC is connected. Change-Id: I8c8017d638442ba8b17c8117d0b1b31f3538925f Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/981914 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/ec_ec_comm_master.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ec_ec_comm_master.h b/include/ec_ec_comm_master.h
index adaf564c65..ccd46a9bc2 100644
--- a/include/ec_ec_comm_master.h
+++ b/include/ec_ec_comm_master.h
@@ -46,4 +46,13 @@ int ec_ec_master_base_charge_control(int max_current,
int otg_voltage,
int allow_charging);
+/**
+ * Sends EC_CMD_REBOOT_EC command to slave, with EC_REBOOT_HIBERNATE parameter.
+ *
+ * @return EC_RES_ERROR on communication error (should always be the case if the
+ * slave successfully hibernates, as it will not be able to write back the
+ * response, else forwards the error code from the slave.
+ */
+int ec_ec_master_hibernate(void);
+
#endif /* EC_EC_COMM_MASTER_H_ */