diff options
author | Sam Hurst <shurst@google.com> | 2021-03-16 15:39:11 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-17 01:25:14 +0000 |
commit | c2d0bad3b700873f5d2bcbaebcd0f2543723e91e (patch) | |
tree | cc372277415594cd83530880d09cd8d18d046241 | |
parent | 93f577fa6307fe28c289336eb9b6119269897df9 (diff) | |
download | chrome-ec-c2d0bad3b700873f5d2bcbaebcd0f2543723e91e.tar.gz |
TCPMV2: Remove unused TypeC State Machine Flag
The TC_FLAGS_DISC_IDENT_IN_PROGRESS TypeC State
Machine flag is unused, so it has been removed.
BUG=b:165934405
BRANCH=none
TEST=make runtests
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I888c53a90a68e0d3690f47ca54e6e765601e7c3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2765156
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | common/usbc/usb_tc_drp_acc_trysrc_sm.c | 36 | ||||
-rw-r--r-- | include/usb_tc_sm.h | 16 |
2 files changed, 10 insertions, 42 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c index cfc8c5a585..7158b4342f 100644 --- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c +++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c @@ -109,26 +109,24 @@ void print_flag(int port, int set_or_clear, int flag); #define TC_FLAGS_HARD_RESET_REQUESTED BIT(13) /* Flag to note we are currently performing PR Swap */ #define TC_FLAGS_PR_SWAP_IN_PROGRESS BIT(14) -/* Flag to note we are performing Discover Identity */ -#define TC_FLAGS_DISC_IDENT_IN_PROGRESS BIT(15) /* Flag to note we should check for connection */ -#define TC_FLAGS_CHECK_CONNECTION BIT(16) +#define TC_FLAGS_CHECK_CONNECTION BIT(15) /* Flag to note request from pd_set_suspend to enter TC_DISABLED state */ -#define TC_FLAGS_REQUEST_SUSPEND BIT(17) +#define TC_FLAGS_REQUEST_SUSPEND BIT(16) /* Flag to note we are in TC_DISABLED state */ -#define TC_FLAGS_SUSPENDED BIT(18) +#define TC_FLAGS_SUSPENDED BIT(17) /* Flag to indicate the port current limit has changed */ -#define TC_FLAGS_UPDATE_CURRENT BIT(19) +#define TC_FLAGS_UPDATE_CURRENT BIT(18) /* Flag to indicate USB mux should be updated */ -#define TC_FLAGS_UPDATE_USB_MUX BIT(20) +#define TC_FLAGS_UPDATE_USB_MUX BIT(19) /* Flag for retimer firmware update */ -#define TC_FLAGS_USB_RETIMER_FW_UPDATE_RUN BIT(21) -#define TC_FLAGS_USB_RETIMER_FW_UPDATE_LTD_RUN BIT(22) +#define TC_FLAGS_USB_RETIMER_FW_UPDATE_RUN BIT(20) +#define TC_FLAGS_USB_RETIMER_FW_UPDATE_LTD_RUN BIT(21) /* Flag for asynchronous call to request Error Recovery */ -#define TC_FLAGS_REQUEST_ERROR_RECOVERY BIT(23) +#define TC_FLAGS_REQUEST_ERROR_RECOVERY BIT(22) /* For checking flag_bit_names[] array */ -#define TC_FLAGS_COUNT 23 +#define TC_FLAGS_COUNT 22 /* On disconnect, clear most of the flags. */ #define CLR_FLAGS_ON_DISCONNECT(port) TC_CLR_FLAG(port, \ @@ -936,16 +934,6 @@ void tc_hard_reset_request(int port) task_wake(PD_PORT_TO_TASK_ID(port)); } -void tc_disc_ident_in_progress(int port) -{ - TC_SET_FLAG(port, TC_FLAGS_DISC_IDENT_IN_PROGRESS); -} - -void tc_disc_ident_complete(int port) -{ - TC_CLR_FLAG(port, TC_FLAGS_DISC_IDENT_IN_PROGRESS); -} - void tc_try_src_override(enum try_src_override_t ov) { if (!IS_ENABLED(CONFIG_USB_PD_TRY_SRC)) @@ -3023,8 +3011,7 @@ static void tc_attached_src_run(const int port) * Attached.SRC. */ if (tc[port].cc_state == PD_CC_NONE && - !TC_CHK_FLAG(port, TC_FLAGS_PR_SWAP_IN_PROGRESS) && - !TC_CHK_FLAG(port, TC_FLAGS_DISC_IDENT_IN_PROGRESS)) { + !TC_CHK_FLAG(port, TC_FLAGS_PR_SWAP_IN_PROGRESS)) { bool tryWait; enum usb_tc_state new_tc_state = TC_UNATTACHED_SNK; @@ -3136,9 +3123,6 @@ static void tc_attached_src_run(const int port) if (!TC_CHK_FLAG(port, TC_FLAGS_TS_DTS_PARTNER) && TC_CHK_FLAG(port, TC_FLAGS_CTVPD_DETECTED)) { - /* Clear TC_FLAGS_DISC_IDENT_IN_PROGRESS */ - TC_CLR_FLAG(port, TC_FLAGS_DISC_IDENT_IN_PROGRESS); - set_state_tc(port, TC_CT_UNATTACHED_SNK); } } diff --git a/include/usb_tc_sm.h b/include/usb_tc_sm.h index 1faa23b45c..71b895b78f 100644 --- a/include/usb_tc_sm.h +++ b/include/usb_tc_sm.h @@ -181,22 +181,6 @@ void tc_request_power_swap(int port); void tc_pr_swap_complete(int port, bool success); /** - * Informs the Type-C State Machine that a Discover Identity is in progress. - * This function is called from the Policy Engine. - * - * @param port USB_C port number - */ -void tc_disc_ident_in_progress(int port); - -/** - * Informs the Type-C State Machine that a Discover Identity is complete. - * This function is called from the Policy Engine. - * - * @param port USB_C port number - */ -void tc_disc_ident_complete(int port); - -/** * Instructs the Attached.SNK to stop drawing power. This function is called * from the Policy Engine and only has effect if the current Type-C state * Attached.SNK. |