Lines Matching full:tc
37 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_unattached_src_run() local
38 const struct device *dev = tc->dev; in tc_unattached_src_run()
47 if (tcpc_is_cc_at_least_one_rd(tc->cc1, tc->cc2)) { in tc_unattached_src_run()
73 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_unattached_wait_src_entry() local
74 const struct device *dev = tc->dev; in tc_unattached_wait_src_entry()
84 usbc_timer_start(&tc->tc_t_vconn_off); in tc_unattached_wait_src_entry()
89 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_unattached_wait_src_run() local
90 const struct device *dev = tc->dev; in tc_unattached_wait_src_run()
93 if (usbc_timer_expired(&tc->tc_t_vconn_off)) { in tc_unattached_wait_src_run()
100 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_unattached_wait_src_exit() local
101 const struct device *dev = tc->dev; in tc_unattached_wait_src_exit()
109 usbc_timer_stop(&tc->tc_t_vconn_off); in tc_unattached_wait_src_exit()
124 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attach_wait_src_entry() local
129 tc->cc_state = TC_CC_NONE; in tc_attach_wait_src_entry()
134 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attach_wait_src_run() local
135 const struct device *dev = tc->dev; in tc_attach_wait_src_run()
141 if (tcpc_is_cc_at_least_one_rd(tc->cc1, tc->cc2)) { in tc_attach_wait_src_run()
151 if (new_cc_state != tc->cc_state) { in tc_attach_wait_src_run()
153 usbc_timer_start(&tc->tc_t_cc_debounce); in tc_attach_wait_src_run()
154 tc->cc_state = new_cc_state; in tc_attach_wait_src_run()
158 if (usbc_timer_running(&tc->tc_t_cc_debounce) && in tc_attach_wait_src_run()
159 !usbc_timer_expired(&tc->tc_t_cc_debounce)) { in tc_attach_wait_src_run()
177 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attach_wait_src_exit() local
180 usbc_timer_stop(&tc->tc_t_cc_debounce); in tc_attach_wait_src_exit()
222 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attached_src_entry() local
223 const struct device *dev = tc->dev; in tc_attached_src_entry()
234 ret = tcpc_set_cc_polarity(tcpc, tc->cc_polarity); in tc_attached_src_entry()
236 LOG_ERR("Couldn't set CC polarity to %d: %d", tc->cc_polarity, ret); in tc_attached_src_entry()
246 atomic_set_bit(&tc->flags, TC_FLAGS_VCONN_ON); in tc_attached_src_entry()
269 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attached_src_run() local
270 const struct device *dev = tc->dev; in tc_attached_src_run()
273 if (tcpc_is_cc_open(tc->cc1, tc->cc2)) { in tc_attached_src_run()
282 if (atomic_test_and_clear_bit(&tc->flags, TC_FLAGS_VCONN_ON)) { in tc_attached_src_run()
301 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attached_src_exit() local
302 const struct device *dev = tc->dev; in tc_attached_src_exit()
336 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_cc_rp_entry() local
337 const struct device *dev = tc->dev; in tc_cc_rp_entry()