diff options
author | Denis Brockus <dbrockus@google.com> | 2020-11-23 16:36:56 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-25 17:45:51 +0000 |
commit | 63153bdc5ec995fc560c348a57721af3f597540b (patch) | |
tree | c239082689231993519fcd9277e62002a8c15de3 /include/usb_pd.h | |
parent | 3fdbe6eec1991a5007e30a5b94a63d52bb7ec138 (diff) | |
download | chrome-ec-63153bdc5ec995fc560c348a57721af3f597540b.tar.gz |
TCPMv2: AP resume should consider Src->Snk swap
TCPMv1 used PD_FLAGS_CHECK_PR_ROLE and
pd_check_pr_role() to accomplish this. This was
missing from TCPMv2.
In the TCPMv2 implementation, policy
pd_can_source_from_device was added to put the
logic in one place to detect if the PDO for a
partner device can and should be the source
Using this policy the AP resume code will check
to see if an already attached partner that we
are sinking from should be sinking from us instead.
BUG=b:169299049
BRANCH=zork
TEST=verify DRP phone will swap back to SNK on AP resume
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I8e584446445c8ee2e1c91973a58a04405cdf9e1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2555865
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r-- | include/usb_pd.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 6a8e084ff3..7c2a41ae3c 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1072,6 +1072,13 @@ bool pd_get_partner_dual_role_power(int port); */ bool pd_get_partner_unconstr_power(int port); +/** + * Check if poower role swap may be needed on AP resume. + * + * @param port USB-C Port number + */ +void pd_resume_check_pr_swap_needed(int port); + /* Control Message type */ enum pd_ctrl_msg_type { /* 0 Reserved */ |