summaryrefslogtreecommitdiff
path: root/board/dingdong
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-11-12 12:51:03 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-15 05:59:55 +0000
commit9de2ef515fd8c534e6ff4dddee0c2b9f5ec012f2 (patch)
tree81f9a166863221f0af2b879ddc602af362fad6de /board/dingdong
parentfeecd2ac585cc4680099707b39995f3d487abc18 (diff)
downloadchrome-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/dingdong')
-rw-r--r--board/dingdong/usb_pd_policy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/dingdong/usb_pd_policy.c b/board/dingdong/usb_pd_policy.c
index 82386a0c96..d082f99c60 100644
--- a/board/dingdong/usb_pd_policy.c
+++ b/board/dingdong/usb_pd_policy.c
@@ -116,13 +116,13 @@ int pd_board_checks(void)
return EC_SUCCESS;
}
-int pd_power_swap(int port)
+int pd_check_power_swap(int port)
{
/* Always refuse power swap */
return 0;
}
-int pd_data_swap(int port, int data_role)
+int pd_check_data_swap(int port, int data_role)
{
/* Always refuse data swap */
return 0;
@@ -132,6 +132,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)
+{
+}
/* ----------------- Vendor Defined Messages ------------------ */
const uint32_t vdo_idh = VDO_IDH(0, /* data caps as USB host */
0, /* data caps as USB device */