From 3a46cbd356b6790eb9787d8d28a0904965224adc Mon Sep 17 00:00:00 2001 From: Ayushee Date: Mon, 30 Mar 2020 11:26:42 -0700 Subject: usb_pd: Cleanup is_modal operation function Removing CONFIG_USB_PD_TBT_COMPAT_MODE check as the enable_tbt_compat_mode() checks if CONFIG_USB_PD_TBT_COMPAT_MODE is enabled. BUG=b:148528713 BRANCH=none TEST=Tested with Thunderolt dock, able to enter Thunderbolt-Compatible mode. Change-Id: Id2b1f6a5ac53221f976becc753b17156b07c359d Signed-off-by: Ayushee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2128267 Reviewed-by: Keith Short Reviewed-by: Abe Levkoy Reviewed-by: Vijay P Hiremath --- common/usb_pd_alt_mode_dfp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c index b1b4e9147b..102889b310 100644 --- a/common/usb_pd_alt_mode_dfp.c +++ b/common/usb_pd_alt_mode_dfp.c @@ -719,8 +719,7 @@ bool is_tbt_cable_superspeed(int port) bool is_modal(int port, int cnt, const uint32_t *payload) { - return IS_ENABLED(CONFIG_USB_PD_TBT_COMPAT_MODE) && - is_vdo_present(cnt, VDO_INDEX_IDH) && + return is_vdo_present(cnt, VDO_INDEX_IDH) && PD_IDH_IS_MODAL(payload[VDO_INDEX_IDH]); } -- cgit v1.2.1