diff options
author | Dossym Nurmukhanov <dossym@google.com> | 2020-12-11 11:07:53 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-12 12:55:40 +0000 |
commit | a86aecb2de50437622e91ee451079175cdef5e1d (patch) | |
tree | 12956101cbe202e8d6e32df97ac2ae51015c12a6 /include/ec_ec_comm_client.h | |
parent | e9be6c5c1be5649f700e1d839d0cc823a1e5edd7 (diff) | |
download | chrome-ec-a86aecb2de50437622e91ee451079175cdef5e1d.tar.gz |
COIL: Rename ec_ec_comm* files to inclusive language
Rename the files to server/client instead
BUG=none
TEST=Rebuild and run on volteer
BRANCH=none
Signed-off-by: dossym@chromium.org
Change-Id: Ibcbdcddfab1b878ff48fc4cb76307efe6de4fac0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2586037
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'include/ec_ec_comm_client.h')
-rw-r--r-- | include/ec_ec_comm_client.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/ec_ec_comm_client.h b/include/ec_ec_comm_client.h new file mode 100644 index 0000000000..ccd46a9bc2 --- /dev/null +++ b/include/ec_ec_comm_client.h @@ -0,0 +1,58 @@ +/* Copyright 2017 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * EC-EC communication, functions for master. + */ + +#ifndef EC_EC_COMM_MASTER_H_ +#define EC_EC_COMM_MASTER_H_ + +#include <stdint.h> +#include "config.h" + +/** + * Sends EC_CMD_BATTERY_GET_DYNAMIC command to slave, and writes the + * battery dynamic information into battery_dynamic[BATT_IDX_BASE]. + * + * Leaves battery_dynamic[BATT_IDX_BASE] intact on error: it is the callers + * responsibility to clear the data or ignore it. + + * @return EC_RES_SUCCESS on success, EC_RES_ERROR on communication error, + * else forwards the error code from the slave. + */ +int ec_ec_master_base_get_dynamic_info(void); + +/** + * Sends EC_CMD_BATTERY_GET_STATIC command to slave, and writes the + * battery static information into battery_static[BATT_IDX_BASE]. + * + * Leaves battery_static[BATT_IDX_BASE] intact on error: it is the callers + * responsibility to clear the data or ignore it. + * + * @return EC_RES_SUCCESS on success, EC_RES_ERROR on communication error, + * else forwards the error code from the slave. + */ +int ec_ec_master_base_get_static_info(void); + +/** + * Sends EC_CMD_CHARGER_CONTROL command to slave, with the given parameters + * (see ec_commands.h/ec_params_charger_control for description). + * + * @return EC_RES_SUCCESS on success, EC_RES_ERROR on communication error, + * else forwards the error code from the slave. + */ +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_ */ |