summaryrefslogtreecommitdiff
path: root/board/hoho/usb_pd_policy.c
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-04 13:39:38 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-07 02:32:38 +0000
commite39f43ed2d79195098c2373389f0495f20e3247c (patch)
treeb871704c8dbbd93801c9284ab8b5e08a9411ddad /board/hoho/usb_pd_policy.c
parent563e7bed1ee5ec4b86b13d759507b5f185706c09 (diff)
downloadchrome-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/hoho/usb_pd_policy.c')
-rw-r--r--board/hoho/usb_pd_policy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/board/hoho/usb_pd_policy.c b/board/hoho/usb_pd_policy.c
index 8252e03d49..9ecfd38611 100644
--- a/board/hoho/usb_pd_policy.c
+++ b/board/hoho/usb_pd_policy.c
@@ -86,8 +86,11 @@ 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)
+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)
{
}
/* ----------------- Vendor Defined Messages ------------------ */