diff options
author | Todd Broch <tbroch@chromium.org> | 2015-06-29 17:38:33 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-01 03:49:10 +0000 |
commit | 943e9292f1b02fb819ec22904825c5274fdc68d2 (patch) | |
tree | f975090d555bd5a1a7b4e76b7443fd262c3c88f9 /common/usb_pd_policy.c | |
parent | e3c72ce5c1fcc48809b06aa2b6c0e4be8f860172 (diff) | |
download | chrome-ec-943e9292f1b02fb819ec22904825c5274fdc68d2.tar.gz |
pd: Change which DP pin config DP source uses for sink capabilities.
DP Alternate mode specification defines two bytes in the DP
capabilities payload with respect to pin configs. One that governs
the DFP and the other the UFP. The one that the DP source needs to
examine depends upon whether the UFP is a receptacle or a plug.
Previously we just examined the DFP pin config which was correct for
all UFP plugs but not UFP receptacles. This change fixes that by
examining bit <6> of capability message to determe plug vs receptacle
and in case of receptacle choosing the UFP ping config instead.
Signed-off-by: Todd Broch <tbroch@chromium.org>
BRANCH=samus
BUG=chromium:505652
TEST=manual, hoho & apple (UFP_D plugs) still work.
While I don't have a test for UFP_D receptacle partner device reports
following for its DP caps which should now decode correctly.
<31:24> 00 Reserved/SBZ
<23:16> 1C UFP pin config == C, D, E
<15:08> 00 DFP pin config zero
<07:00> C5 <6> == 1 == receptacle
Change-Id: Ib9e3a808828ff6b8c062baf0fc3c23b3da33c2c3
Reviewed-on: https://chromium-review.googlesource.com/282621
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r-- | common/usb_pd_policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index 3972e2289c..2606ca651f 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -437,7 +437,7 @@ int pd_dfp_dp_get_pin_mode(int port, uint32_t status) mode_caps = modep->data->mode_vdo[modep->opos - 1]; /* TODO(crosbug.com/p/39656) revisit with DFP that can be a sink */ - pin_caps = PD_VDO_MODE_DP_SRCP(mode_caps); + pin_caps = PD_DP_PIN_CAPS(mode_caps); /* if don't want multi-function then ignore those pin configs */ if (!PD_VDO_DPSTS_MF_PREF(status)) |