diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-01-04 13:39:38 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-07 02:32:38 +0000 |
commit | e39f43ed2d79195098c2373389f0495f20e3247c (patch) | |
tree | b871704c8dbbd93801c9284ab8b5e08a9411ddad /board/twinkie/usb_pd_policy.c | |
parent | 563e7bed1ee5ec4b86b13d759507b5f185706c09 (diff) | |
download | chrome-ec-e39f43ed2d79195098c2373389f0495f20e3247c.tar.gz |
samus: pd: on PD connection, if sink, ask for power swap
For samus, on PD connection or on resume to S0, if we are a sink,
and the other side supports PR_SWAP, then attempt a power swap.
This adds callback functions into board policy file to check
and issue power or data swaps if required by the product.
BUG=chrome-os-partner:31195
BRANCH=samus
TEST=connect samus to zinger and make sure zinger always ends up
as SRC-UFP.
connect samus to samus with both in S0 and see that
they swap power roles once and not data roles.
connect one samus in S0 to one samus in S5 and see that the one
in S5 is sink. then when you boot the one in S5 it switches to a
source.
connect samus to samus with both in S0. do chgoverride 1 on one
side to start charging from the other samus. then on the same
side, turn off the machine (S5) and resume (S0), and see that it
is still charging from the other samus (ie has not switched roles
to source).
Change-Id: Ifab2465fccef77448ac4771a3c2de1c867cbbec4
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/238302
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/twinkie/usb_pd_policy.c')
-rw-r--r-- | board/twinkie/usb_pd_policy.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/twinkie/usb_pd_policy.c b/board/twinkie/usb_pd_policy.c index 4d568aff83..3491326ec3 100644 --- a/board/twinkie/usb_pd_policy.c +++ b/board/twinkie/usb_pd_policy.c @@ -100,8 +100,11 @@ int pd_check_data_swap(int port, int data_role) return 1; } -void pd_new_contract(int port, int pr_role, int dr_role, - int partner_pr_swap, int partner_dr_swap) +void pd_check_pr_role(int port, int pr_role, int partner_pr_swap) +{ +} + +void pd_check_dr_role(int port, int dr_role, int partner_dr_swap) { } |