diff options
author | Keith Short <keithshort@chromium.org> | 2020-04-30 17:47:32 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-01 20:20:22 +0000 |
commit | ff7a100aaf125c95a7c88e70b409cb3e377ace43 (patch) | |
tree | 6890bf858deb74c24abc59623520fbaa7ec75e71 /include | |
parent | 4f5972acaea79fadfb23302f47bbc4f331cb39ae (diff) | |
download | chrome-ec-ff7a100aaf125c95a7c88e70b409cb3e377ace43.tar.gz |
it83xx tcpc: Captured received SOP message type
Add support to the IT83xx TCPC driver to capture the received SOP
messaage type, matching the implementation of all other TCPC drivers.
This change also does a minor cleanup of the PD_HEADER_SOP macro to
ensure callers cannot overflow the field.
BUG=none
BRANCH=none
TEST=make buildall -j
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I63d324761538c6fe1ae6cee9ad172ee052c474b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2173303
Tested-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 96d468839b..6033a4cfa0 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1183,7 +1183,7 @@ enum cable_outlet { * NOTE: This is not part of the PD spec. */ #define PD_HEADER_GET_SOP(header) (((header) >> 28) & 0xf) -#define PD_HEADER_SOP(sop) ((sop) << 28) +#define PD_HEADER_SOP(sop) (((sop) & 0xf) << 28) enum pd_msg_type { PD_MSG_SOP, |