Lines Matching full:tc

24 	struct tc_sm_t *tc = data->tc;  in sink_power_sub_states()  local
27 cc = tc->cc_polarity ? tc->cc2 : tc->cc1; in sink_power_sub_states()
59 if (new_cc_voltage != tc->cc_voltage) { in sink_power_sub_states()
60 tc->cc_voltage = new_cc_voltage; in sink_power_sub_states()
61 atomic_set_bit(&tc->flags, TC_FLAGS_RP_SUBSTATE_CHANGE); in sink_power_sub_states()
62 usbc_timer_start(&tc->tc_t_rp_value_change); in sink_power_sub_states()
66 if (usbc_timer_expired(&tc->tc_t_rp_value_change) == false) { in sink_power_sub_states()
71 if (atomic_test_and_clear_bit(&tc->flags, TC_FLAGS_RP_SUBSTATE_CHANGE)) { in sink_power_sub_states()
83 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_unattached_snk_entry() local
91 usbc_bypass_next_sleep(tc->dev); in tc_unattached_snk_entry()
99 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_unattached_snk_run() local
100 const struct device *dev = tc->dev; in tc_unattached_snk_run()
106 if (tcpc_is_cc_rp(tc->cc1) || tcpc_is_cc_rp(tc->cc2)) { in tc_unattached_snk_run()
116 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attach_wait_snk_entry() local
120 tc->cc_state = TC_CC_NONE; in tc_attach_wait_snk_entry()
126 usbc_bypass_next_sleep(tc->dev); in tc_attach_wait_snk_entry()
134 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attach_wait_snk_run() local
135 const struct device *dev = tc->dev; in tc_attach_wait_snk_run()
141 if (tcpc_is_cc_rp(tc->cc1) || tcpc_is_cc_rp(tc->cc2)) { in tc_attach_wait_snk_run()
148 if (new_cc_state != tc->cc_state) { in tc_attach_wait_snk_run()
149 usbc_timer_start(&tc->tc_t_cc_debounce); in tc_attach_wait_snk_run()
150 tc->cc_state = new_cc_state; in tc_attach_wait_snk_run()
154 if (usbc_timer_running(&tc->tc_t_cc_debounce) && in tc_attach_wait_snk_run()
155 usbc_timer_expired(&tc->tc_t_cc_debounce) == false) { in tc_attach_wait_snk_run()
158 usbc_bypass_next_sleep(tc->dev); in tc_attach_wait_snk_run()
185 usbc_bypass_next_sleep(tc->dev); in tc_attach_wait_snk_run()
190 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attach_wait_snk_exit() local
192 usbc_timer_stop(&tc->tc_t_cc_debounce); in tc_attach_wait_snk_exit()
200 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attached_snk_entry() local
201 const struct device *dev = tc->dev; in tc_attached_snk_entry()
209 tc->cc_voltage = TC_CC_VOLT_OPEN; in tc_attached_snk_entry()
212 ret = tcpc_set_cc_polarity(tcpc, tc->cc_polarity); in tc_attached_snk_entry()
214 LOG_ERR("Couldn't set CC polarity to %d: %d", tc->cc_polarity, ret); in tc_attached_snk_entry()
236 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attached_snk_run() local
237 const struct device *dev = tc->dev; in tc_attached_snk_run()
258 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_attached_snk_exit() local
259 const struct device *dev = tc->dev; in tc_attached_snk_exit()
280 struct tc_sm_t *tc = (struct tc_sm_t *)obj; in tc_cc_rd_entry() local
281 const struct device *dev = tc->dev; in tc_cc_rd_entry()