diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-09-10 15:27:31 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-11 13:51:00 -0700 |
commit | fd92f9bfebcf3125cf2a7e0f5931f3cd50e395e8 (patch) | |
tree | 7583ec2d0700c369daf696a185cda66788d74422 /include | |
parent | 17296409d8eec57bd3f11c8835ad13f22d4f13fc (diff) | |
download | chrome-ec-fd92f9bfebcf3125cf2a7e0f5931f3cd50e395e8.tar.gz |
pd: add swap commands to USB_PD_CONTROL host command
Add all swap commands to USB_PD_CONTROL host command: data,
power, and vconn swap.
BUG=none
BRANCH=smaug
TEST=tested on both samus and ryu while connected to each other.
Change-Id: I280a0da2d3c5a5436243134ab3f2ec353ebf6ab8
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/299290
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 14ef6fb20a..6fb784d5f9 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3149,10 +3149,19 @@ enum usb_pd_control_mux { USB_PD_CTRL_MUX_COUNT }; +enum usb_pd_control_swap { + USB_PD_CTRL_SWAP_NONE = 0, + USB_PD_CTRL_SWAP_DATA = 1, + USB_PD_CTRL_SWAP_POWER = 2, + USB_PD_CTRL_SWAP_VCONN = 3, + USB_PD_CTRL_SWAP_COUNT +}; + struct ec_params_usb_pd_control { uint8_t port; uint8_t role; uint8_t mux; + uint8_t swap; } __packed; struct ec_response_usb_pd_control { @@ -3164,7 +3173,8 @@ struct ec_response_usb_pd_control { struct ec_response_usb_pd_control_v1 { uint8_t enabled; /* [0] comm enabled [1] connected */ - uint8_t role; /* [0] power: 0=SNK/1=SRC [1] data: 0=UFP/1=DFP */ + uint8_t role; /* [0] power: 0=SNK/1=SRC [1] data: 0=UFP/1=DFP + [2] vconn 0=off/1=on */ uint8_t polarity; char state[32]; } __packed; |