summaryrefslogtreecommitdiff
path: root/board/cheza
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2019-11-22 11:42:29 -0800
committerCommit Bot <commit-bot@chromium.org>2019-11-26 20:01:22 +0000
commit3cb2b8e2be4c3526510f46ad69225b57e2b34cd0 (patch)
treecedfefa7e1feb2fbfde897258aaa550c453bf6e7 /board/cheza
parent3e2f184b5bb43461adc3c4ec791ef1ae34441946 (diff)
downloadchrome-ec-3cb2b8e2be4c3526510f46ad69225b57e2b34cd0.tar.gz
usb_mux: cleanup the usb_mux_get() function
Simplified the usb_mux_get() function and made the MUX info prints same as in ectool. BUG=none BRANCH=none TEST=make buildall -j Change-Id: Iefb16e1dbd323afbe248b06fe9c53abc63be9a67 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1931284 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/cheza')
-rw-r--r--board/cheza/usb_pd_policy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/board/cheza/usb_pd_policy.c b/board/cheza/usb_pd_policy.c
index 502a773150..061c6bb5df 100644
--- a/board/cheza/usb_pd_policy.c
+++ b/board/cheza/usb_pd_policy.c
@@ -373,12 +373,10 @@ static void svdm_dp_post_config(int port)
static int is_dp_muxable(int port)
{
int i;
- const char *dp_str, *usb_str;
for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; i++)
if (i != port) {
- usb_mux_get(i, &dp_str, &usb_str);
- if (dp_str)
+ if (usb_mux_get(i) & USB_PD_MUX_DP_ENABLED)
return 0;
}