diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2020-01-30 20:23:49 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-04 04:07:54 +0000 |
commit | 6b87e07a55b83251d30288dbb297d602ddba811a (patch) | |
tree | 37a00c1d31f8289bdb1e9e5918d5d6b7e1f2416e /common/usb_pd_policy.c | |
parent | 51e1a092de5daf59b1a6b39755183a6ef312f199 (diff) | |
download | chrome-ec-6b87e07a55b83251d30288dbb297d602ddba811a.tar.gz |
TCPMv1/v2: Move DFP alternate mode functions to common file
BUG=b:148528713
BRANCH=none
TEST=make buildall -j
Change-Id: I34bf543b381fc9e4f858a48d3d1568de42438509
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2032725
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r-- | common/usb_pd_policy.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index 5055b3d1a3..c97fb697a9 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -691,13 +691,6 @@ struct pd_policy *pd_get_am_policy(int port) return &pe[port]; } -int pd_alt_mode(int port, uint16_t svid) -{ - struct svdm_amode_data *modep = pd_get_amode_data(port, svid); - - return (modep) ? modep->opos : -1; -} - /* Note: Enter mode flag is not needed by TCPMv1 */ void pd_set_dfp_enter_mode_flag(int port, bool set) { @@ -757,36 +750,6 @@ static int enter_tbt_compat_mode(int port, uint32_t *payload) return 2; } -uint16_t pd_get_identity_vid(int port) -{ - return PD_IDH_VID(pe[port].identity[0]); -} - -uint16_t pd_get_identity_pid(int port) -{ - return PD_PRODUCT_PID(pe[port].identity[2]); -} - -uint8_t pd_get_product_type(int port) -{ - return PD_IDH_PTYPE(pe[port].identity[0]); -} - -int pd_get_svid_count(int port) -{ - return pe[port].svid_cnt; -} - -uint16_t pd_get_svid(int port, uint16_t svid_idx) -{ - return pe[port].svids[svid_idx].svid; -} - -uint32_t *pd_get_mode_vdo(int port, uint16_t svid_idx) -{ - return pe[port].svids[svid_idx].mode_vdo; -} - #ifdef CONFIG_CMD_USB_PD_PE static void dump_pe(int port) { |