diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-05-21 07:32:59 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-05 04:22:56 +0000 |
commit | 31369a69dbf34cff8d9135f5d503efa717e3da35 (patch) | |
tree | a77f2778fb71da215b5d8748a551d49e21e51e89 /common/host_command.c | |
parent | 565f1cb5ae1ebd287e1bf00ab8245274a5ecbaa6 (diff) | |
download | chrome-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 'common/host_command.c')
-rw-r--r-- | common/host_command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/host_command.c b/common/host_command.c index 36344ac7ec..9f72fe7f43 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -166,6 +166,11 @@ void host_command_received(struct host_cmd_handler_args *args) return; } + /* + * TODO (crosbug.com/p/29315): This is typically running in interrupt + * context, so it woud be better not to send the response here, and to + * let the host command task send the response. + */ /* Send the response now */ host_send_response(args); } @@ -331,6 +336,11 @@ void host_packet_receive(struct host_packet *pkt) return; host_packet_bad: + /* + * TODO (crosbug.com/p/29315): This is typically running in interrupt + * context, so it woud be better not to send the response here, and to + * let the host command task send the response. + */ /* Improperly formed packet from host, so send an error response */ host_packet_respond(&args0); } |