summaryrefslogtreecommitdiff
path: root/common/usb_pd_alt_mode_dfp.c
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2020-08-22 15:24:15 -0600
committerCommit Bot <commit-bot@chromium.org>2020-08-24 23:02:10 +0000
commit5482623ae79e97467576ad520c53273d412e9cc0 (patch)
tree10d971579b00366db240bdaba119f2706cb805bf /common/usb_pd_alt_mode_dfp.c
parent3412f7ff3d1dd5905f92d84189270657896b508a (diff)
downloadchrome-ec-5482623ae79e97467576ad520c53273d412e9cc0.tar.gz
usb_mux: move usb_mux_set_safe_mode()
Move usb_mux_set_safe_mode() definition into usb_common.c so it's available to the test framework. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I789a470468ae441e366afbf94ce3c29db526dfd8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2370409 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/usb_pd_alt_mode_dfp.c')
-rw-r--r--common/usb_pd_alt_mode_dfp.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c
index 0cd5b2821e..614776768e 100644
--- a/common/usb_pd_alt_mode_dfp.c
+++ b/common/usb_pd_alt_mode_dfp.c
@@ -10,6 +10,7 @@
#include "task.h"
#include "task_id.h"
#include "timer.h"
+#include "usb_common.h"
#include "usb_charge.h"
#include "usb_dp_alt_mode.h"
#include "usb_mux.h"
@@ -638,25 +639,6 @@ void notify_sysjump_ready(void)
TASK_EVENT_SYSJUMP_READY, 0);
}
-/*
- * Before entering into alternate mode, state of the USB-C MUX
- * needs to be in safe mode.
- * Ref: USB Type-C Cable and Connector Specification
- * Section E.2.2 Alternate Mode Electrical Requirements
- */
-void usb_mux_set_safe_mode(int port)
-{
- if (IS_ENABLED(CONFIG_USBC_SS_MUX)) {
- usb_mux_set(port, IS_ENABLED(CONFIG_USB_MUX_VIRTUAL) ?
- USB_PD_MUX_SAFE_MODE : USB_PD_MUX_NONE,
- USB_SWITCH_CONNECT, pd_get_polarity(port));
- }
-
- /* Isolate the SBU lines. */
- if (IS_ENABLED(CONFIG_USBC_PPC_SBU))
- ppc_set_sbu(port, 0);
-}
-
static inline bool is_rev3_vdo(int port, enum tcpm_transmit_type type)
{
return pd_get_vdo_ver(port, type) == PD_REV30;