Lines Matching full:tc

25 	struct tc_sm_t *tc = data->tc;  in tc_subsys_init()  local
28 tc->dev = dev; in tc_subsys_init()
31 smf_set_initial(SMF_CTX(tc), &tc_states[TC_DISABLED_STATE]); in tc_subsys_init()
41 struct tc_sm_t *tc = data->tc; in tc_run() local
82 if (tcpc_get_cc(tcpc, &tc->cc1, &tc->cc2) != 0) { in tc_run()
87 tc->cc1 = TC_CC_VOLT_OPEN; in tc_run()
88 tc->cc2 = TC_CC_VOLT_OPEN; in tc_run()
92 tc->cc_polarity = (tc->cc1 > tc->cc2) ? TC_POLARITY_CC1 : TC_POLARITY_CC2; in tc_run()
104 smf_run_state(SMF_CTX(tc)); in tc_run()
109 * @brief Checks if the TC Layer is in an Attached state
126 struct tc_sm_t *tc = data->tc; in tc_init() local
131 usbc_timer_init(&tc->tc_t_error_recovery, TC_T_ERROR_RECOVERY_SOURCE_MIN_MS); in tc_init()
132 usbc_timer_init(&tc->tc_t_cc_debounce, TC_T_CC_DEBOUNCE_MAX_MS); in tc_init()
133 usbc_timer_init(&tc->tc_t_rp_value_change, TC_T_RP_VALUE_CHANGE_MAX_MS); in tc_init()
135 usbc_timer_init(&tc->tc_t_vconn_off, TC_T_VCONN_OFF_MAX_MS); in tc_init()
139 tc->flags = ATOMIC_INIT(0); in tc_init()
185 struct tc_sm_t *tc = data->tc; in tc_set_state() local
188 smf_set_state(SMF_CTX(tc), &tc_states[state]); in tc_set_state()
198 return data->tc->ctx.current - &tc_states[0]; in tc_get_state()
245 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_cc_open_entry() local
246 const struct device *dev = tc->dev; in tc_cc_open_entry()
251 tc->cc_voltage = TC_CC_VOLT_OPEN; in tc_cc_open_entry()
290 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_error_recovery_entry() local
295 usbc_timer_start(&tc->tc_t_error_recovery); in tc_error_recovery_entry()
303 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_error_recovery_run() local
304 const struct device *dev = tc->dev; in tc_error_recovery_run()
307 if (usbc_timer_expired(&tc->tc_t_error_recovery) == false) { in tc_error_recovery_run()