summaryrefslogtreecommitdiff
path: root/include/host_command.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-05-21 07:32:59 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-05 04:22:56 +0000
commit31369a69dbf34cff8d9135f5d503efa717e3da35 (patch)
treea77f2778fb71da215b5d8748a551d49e21e51e89 /include/host_command.h
parent565f1cb5ae1ebd287e1bf00ab8245274a5ecbaa6 (diff)
downloadchrome-ec-31369a69dbf34cff8d9135f5d503efa717e3da35.tar.gz
samus: Add EC <-> PD i2c interface using host commands
Initial support for EC to PD communication using host command interface over i2c. BUG=chrome-os-partner:28351, chrome-os-partner:28352 BRANCH=none TEST=on EC console send hello host command: > pdcmd 0x01 0 0xa0 0xb0 0xc0 0xd0 Host command 0x01, returned 4 a4 b3 c2 d1 Change-Id: I0969808f455574ee456d6db8a60ce9b1204a0739 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/200786 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/host_command.h')
-rw-r--r--include/host_command.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/host_command.h b/include/host_command.h
index 158367a80b..1fbf0b6554 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -207,4 +207,18 @@ void host_packet_receive(struct host_packet *pkt);
*/
void host_throttle_cpu(int throttle);
+/**
+ * Send host command to PD MCU.
+ *
+ * @param command Host command number
+ * @param version Version of host command
+ * @param outdata Pointer to buffer of out data
+ * @param outsize Size of buffer to out data
+ * @param indata Pointer to buffer to store response
+ * @param insize Size of buffer to store response
+ */
+int pd_host_command(int command, int version,
+ const void *outdata, int outsize,
+ void *indata, int insize);
+
#endif /* __CROS_EC_HOST_COMMAND_H */