diff options
author | Denis Brockus <dbrockus@chromium.org> | 2020-01-27 09:45:58 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-30 17:45:27 +0000 |
commit | 7dec638eb577aaa3a00d0551d73c276b94ebacb2 (patch) | |
tree | 18bae7940876301320ce569984f2d4ee58dea091 /driver/tcpm/anx7447.c | |
parent | 41614aba60ca77cd566b9bf29494aaf562225292 (diff) | |
download | chrome-ec-7dec638eb577aaa3a00d0551d73c276b94ebacb2.tar.gz |
usb: differentiate DTS polarity and normal device polarity
When we have SNK_DTS polarity, we still want to drive both CC
lines with the appropriate pull. SRC_DTS should not show as
having a polarity. Non-DTS should show the correct polarity.
We were only handling the last sentence of that.
BUG=b:147754772
BRANCH=none
TEST=verify SuzyQ works on zork
Change-Id: I013f9d881427d6d97b655f88cfb3a94e3ed10c61
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2022914
Tested-by: David Schneider <dnschneid@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver/tcpm/anx7447.c')
-rw-r--r-- | driver/tcpm/anx7447.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/tcpm/anx7447.c b/driver/tcpm/anx7447.c index a765af5c2e..ed4e601f6c 100644 --- a/driver/tcpm/anx7447.c +++ b/driver/tcpm/anx7447.c @@ -655,7 +655,8 @@ static int anx7447_set_polarity(int port, enum tcpc_cc_polarity polarity) return tcpc_update8(port, TCPC_REG_TCPC_CTRL, TCPC_REG_TCPC_CTRL_SET(1), - (polarity) ? MASK_SET : MASK_CLR); + polarity_rm_dts(polarity) + ? MASK_SET : MASK_CLR); } /* |