diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-11-12 12:51:03 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-15 05:59:55 +0000 |
commit | 9de2ef515fd8c534e6ff4dddee0c2b9f5ec012f2 (patch) | |
tree | 81f9a166863221f0af2b879ddc602af362fad6de /board/plankton | |
parent | feecd2ac585cc4680099707b39995f3d487abc18 (diff) | |
download | chrome-ec-9de2ef515fd8c534e6ff4dddee0c2b9f5ec012f2.tar.gz |
pd: allow policy layer to ask for PR/DR_swap on new contract
Allow policy layer to request a PR or DR swap upon formation of
a power contract. Zinger always asks for a data swap so it can
be a UFP, and Samus asks for a data swap only if it is a UFP to
become a DFP.
BUG=chrome-os-partner:33754, chrome-os-partner:31195
BRANCH=samus
TEST=load onto samus and zinger and make sure they swap roles
upon connect with no collisions
Change-Id: I275c9669549c26f25c58f80845daad8edab11313
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/229327
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/plankton')
-rw-r--r-- | board/plankton/usb_pd_policy.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/board/plankton/usb_pd_policy.c b/board/plankton/usb_pd_policy.c index ea240107c2..d5274ba0b5 100644 --- a/board/plankton/usb_pd_policy.c +++ b/board/plankton/usb_pd_policy.c @@ -170,13 +170,13 @@ int pd_board_checks(void) return EC_SUCCESS; } -int pd_power_swap(int port) +int pd_check_power_swap(int port) { /* Always allow power swap */ return 1; } -int pd_data_swap(int port, int data_role) +int pd_check_data_swap(int port, int data_role) { /* Always allow data swap */ return 1; @@ -186,3 +186,8 @@ void pd_execute_data_swap(int port, int data_role) { /* Do nothing */ } + +void pd_new_contract(int port, int pr_role, int dr_role, + int partner_pr_swap, int partner_dr_swap) +{ +} |