diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2020-01-20 19:34:46 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-30 06:52:38 +0000 |
commit | 0171ea4e6b23cf0c54e83fe3c2272ed30dc28c8d (patch) | |
tree | 3f0431fa91f8898257edbc15b37317f411a4300c /test | |
parent | a828ad21ab44d7f19ebc2873285ebd074727c2e5 (diff) | |
download | chrome-ec-0171ea4e6b23cf0c54e83fe3c2272ed30dc28c8d.tar.gz |
TCPMv1/v2: Move EC_CMD_USB_PD_CONTROL host command to common file
BUG=b:142911453
BRANCH=none
TEST=make buildall -j
Change-Id: Iadb75b9b187a0444c445c2641ec71d592cf4ac92
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2013228
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/fake_usbc.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/test/fake_usbc.c b/test/fake_usbc.c index 2ee1791717..36e0d7ca48 100644 --- a/test/fake_usbc.c +++ b/test/fake_usbc.c @@ -142,9 +142,75 @@ void pd_dev_get_rw_hash(int port, uint16_t *dev_id, uint8_t *rw_hash, { } +int pd_comm_is_enabled(int port) +{ + return 0; +} + +bool pd_get_partner_data_swap_capable(int port) +{ + return true; +} + +bool pd_capable(int port) +{ + return true; +} + +#ifndef CONFIG_TEST_USB_PE_SM +enum idh_ptype get_usb_pd_mux_cable_type(int port) +{ + return IDH_PTYPE_UNDEF; +} +#endif + #ifndef CONFIG_USB_TYPEC_DRP_ACC_TRYSRC bool pd_is_disconnected(int port) { return false; } + +void pd_set_dual_role(int port, enum pd_dual_role_states state) +{ +} + +enum tcpc_cc_polarity pd_get_polarity(int port) +{ + return POLARITY_CC1; +} + +bool pd_get_vconn_state(int port) +{ + return false; +} + +bool pd_get_partner_dual_role_power(int port) +{ + return false; +} + +uint8_t pd_get_task_state(int port) +{ + return 0; +} + +enum pd_cc_states pd_get_task_cc_state(int port) +{ + return PD_CC_NONE; +} + +int pd_is_connected(int port) +{ + return true; +} + +bool pd_get_partner_unconstr_power(int port) +{ + return 0; +} + +const char *pd_get_task_state_name(int port) +{ + return NULL; +} #endif /* CONFIG_USB_TYPEC_DRP_ACC_TRYSRC */ |