From 31369a69dbf34cff8d9135f5d503efa717e3da35 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Wed, 21 May 2014 07:32:59 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/200786 Reviewed-by: Randall Spangler --- include/host_command.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/host_command.h') 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 */ -- cgit v1.2.1