summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-10-11 23:18:34 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-19 12:56:42 -0700
commit7c2c5a9dc3779587f78a7c602cefeb667d210d41 (patch)
treef2b179a1f14cebf2be87553ea56d23da46dfa483 /include/usb_pd.h
parente7dfbf35a403dfa71bb839c3e722a347447be3f5 (diff)
downloadchrome-ec-7c2c5a9dc3779587f78a7c602cefeb667d210d41.tar.gz
pd: Add "freeze" dual-role policy
Add a new DRP policy to "freeze" the power role of each port, never toggling automatically, though manual role swaps may still occur. BUG=chromium:769895 BRANCH=servo TEST=On servo_v4, verify DUT port stays in SRC role and POWER port stays in SNK role while disconnected. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ibff3cd1ffaf0e884b030c231003763a57acbe02e Reviewed-on: https://chromium-review.googlesource.com/715276 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 816fe15517..bcb7df3ada 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -743,9 +743,15 @@ enum pd_cc_states {
#ifdef CONFIG_USB_PD_DUAL_ROLE
enum pd_dual_role_states {
+ /* While disconnected, toggle between src and sink */
PD_DRP_TOGGLE_ON,
+ /* Stay in src until disconnect, then stay in sink forever */
PD_DRP_TOGGLE_OFF,
+ /* Stay in current power role, don't switch. No auto-toggle support */
+ PD_DRP_FREEZE,
+ /* Switch to sink */
PD_DRP_FORCE_SINK,
+ /* Switch to source */
PD_DRP_FORCE_SOURCE,
};
/**