diff options
author | Nick Sanders <nsanders@chromium.org> | 2018-05-21 19:20:32 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-15 20:36:10 -0700 |
commit | 0c94bad3ebecb4f33544ffb3b136746d044c4ea9 (patch) | |
tree | 0afb0d601c129e794388eacf235a238cdbed5929 /board/coral | |
parent | 84d2e6824b8eaa68dc0d0920822a5c6489005683 (diff) | |
download | chrome-ec-0c94bad3ebecb4f33544ffb3b136746d044c4ea9.tar.gz |
servo_v4: add per port dualrole setting
This adds support to configure dualrole setting
per port, so that servo v4 can adjust charge and
dut port separately.
servo will detect charge capability on CHG port
and choose source or sink as appropriate.
Fix null dereference bug in genvif duel to dynamic src_pdo.
"cc" command allows src, snk, srcdts, snkdts configurations.
BRANCH=None
BUG=b:72557427
TEST=charge through and also passive hub. Note Dru doesn't accept DTS hub.
TEST=make buildall -j
Change-Id: I19f1d1a5c37647fec72202191faa4821c06fb460
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1096654
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/coral')
-rw-r--r-- | board/coral/usb_pd_policy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/coral/usb_pd_policy.c b/board/coral/usb_pd_policy.c index 20286af0a0..60cbdd3276 100644 --- a/board/coral/usb_pd_policy.c +++ b/board/coral/usb_pd_policy.c @@ -141,7 +141,7 @@ int pd_check_power_swap(int port) * otherwise assume our role is fixed (not in S0 or console command * to fix our role). */ - return pd_get_dual_role() == PD_DRP_TOGGLE_ON ? 1 : 0; + return pd_get_dual_role(port) == PD_DRP_TOGGLE_ON ? 1 : 0; } int pd_check_data_swap(int port, int data_role) @@ -175,7 +175,7 @@ void pd_check_pr_role(int port, int pr_role, int flags) * if a power swap is necessary. */ if ((flags & PD_FLAGS_PARTNER_DR_POWER) && - pd_get_dual_role() == PD_DRP_TOGGLE_ON) { + pd_get_dual_role(port) == PD_DRP_TOGGLE_ON) { /* * If we are a sink and partner is not externally powered, then * swap to become a source. If we are source and partner is |