diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2020-01-30 15:08:26 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-04 04:07:51 +0000 |
commit | 1c5d43dd90a55dc3e5a61447aaa8e0441b13b236 (patch) | |
tree | 2422948d19d949585f12cfc44167b752edc7f1af /common/usb_pd_policy.c | |
parent | a14f04dd9525b4e59c549bc6cdc193da45423b0c (diff) | |
download | chrome-ec-1c5d43dd90a55dc3e5a61447aaa8e0441b13b236.tar.gz |
TCPMv1/v2: Move dfp_consume_identity() to common file
BUG=b:148528713
BRANCH=none
TEST=make buildall -j
Change-Id: I5b0bbd553cbe4fc76478b1c89b0f3f391f074a27
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2032158
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r-- | common/usb_pd_policy.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index 10264e1f0e..49d5f1a607 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -633,33 +633,6 @@ void pd_dfp_pe_init(int port) memset(&pe[port], 0, sizeof(struct pd_policy)); } -static void dfp_consume_identity(int port, int cnt, uint32_t *payload) -{ - int ptype = PD_IDH_PTYPE(payload[VDO_I(IDH)]); - size_t identity_size = MIN(sizeof(pe[port].identity), - (cnt - 1) * sizeof(uint32_t)); - pd_dfp_pe_init(port); - memcpy(&pe[port].identity, payload + 1, identity_size); - - switch (ptype) { - case IDH_PTYPE_AMA: -/* Leave vbus ON if the following macro is false */ -#if defined(CONFIG_USB_PD_DUAL_ROLE) && defined(CONFIG_USBC_VCONN_SWAP) - /* Adapter is requesting vconn, try to supply it */ - if (PD_VDO_AMA_VCONN_REQ(payload[VDO_I(AMA)])) - pd_try_vconn_src(port); - - /* Only disable vbus if vconn was requested */ - if (PD_VDO_AMA_VCONN_REQ(payload[VDO_I(AMA)]) && - !PD_VDO_AMA_VBUS_REQ(payload[VDO_I(AMA)])) - pd_power_supply_reset(port); -#endif - break; - default: - break; - } -} - static void dfp_consume_cable_response(int port, int cnt, uint32_t *payload, uint16_t head) { |