From daed130e62e7332037e46c70277816e0630ad04a Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 30 Aug 2018 16:13:26 -0600 Subject: ss-mux: update semantics for TCPC/MUX only used as MUX This converts the compile time option of CONFIG_USB_PD_TCPM_TCPCI_MUX_ONLY into a runtime option to better support draggon egg designs and reduce CONFIG complexity in general. Introduce new mux_read/write to read from tcpc_config_t or mux driver depending on new flag setting. Audited all mux drivers for any use of tcpc_read/write and updated to mux_read/write. BRANCH=none BUG=b:110937880 TEST=On Bip with CL stack: Verified by connecting DP monitor at boot; Verified plug / unplug of DP cable works; Change-Id: I968893b886ff0ccc4074beae5ec42973814ae77c Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/1200062 Commit-Ready: Gaggery Tsai Reviewed-by: Scott Collyer --- board/coral/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board/coral/board.c') diff --git a/board/coral/board.c b/board/coral/board.c index bc37b92d13..2cf54638e5 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -278,10 +278,10 @@ const enum gpio_signal hibernate_wake_pins[] = { const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); -static int ps8751_tune_mux(const struct usb_mux *mux) +static int ps8751_tune_mux(int port) { /* 0x98 sets lower EQ of DP port (4.5db) */ - tcpc_write(mux->port_addr, PS8XXX_REG_MUX_DP_EQ_CONFIGURATION, 0x98); + mux_write(port, PS8XXX_REG_MUX_DP_EQ_CONFIGURATION, 0x98); return EC_SUCCESS; } -- cgit v1.2.1