File tree Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -1371,6 +1371,12 @@ static const struct smf_state pe_states[PE_STATE_COUNT] = {
13711371 pe_src_ready_exit ,
13721372 NULL ,
13731373 NULL ),
1374+ [PE_SRC_DISABLED ] = SMF_CREATE_STATE (
1375+ pe_src_disabled_entry ,
1376+ NULL ,
1377+ NULL ,
1378+ NULL ,
1379+ NULL ),
13741380 [PE_SRC_TRANSITION_TO_DEFAULT ] = SMF_CREATE_STATE (
13751381 pe_src_transition_to_default_entry ,
13761382 pe_src_transition_to_default_run ,
Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ enum usbc_pe_state {
8383 PE_SRC_TRANSITION_SUPPLY ,
8484 /** PE_SRC_Ready */
8585 PE_SRC_READY ,
86+ /** PE_SRC_Disabled */
87+ PE_SRC_DISABLED ,
8688 /** PE_SRC_Hard_Reset */
8789 PE_SRC_HARD_RESET ,
8890 /** PE_SRC_Hard_Reset_Received */
Original file line number Diff line number Diff line change @@ -154,9 +154,12 @@ void pe_src_discovery_run(void *obj)
154154 * 1) The SourceCapabilityTimer times out
155155 * 2) And CapsCounter ≤ nCapsCount
156156 */
157- if (usbc_timer_expired (& pe -> pd_t_typec_send_source_cap )
158- && pe -> caps_counter <= PD_N_CAPS_COUNT ) {
159- pe_set_state (dev , PE_SRC_SEND_CAPABILITIES );
157+ if (usbc_timer_expired (& pe -> pd_t_typec_send_source_cap )) {
158+ if (pe -> caps_counter <= PD_N_CAPS_COUNT ) {
159+ pe_set_state (dev , PE_SRC_SEND_CAPABILITIES );
160+ } else {
161+ pe_set_state (dev , PE_SRC_DISABLED );
162+ }
160163 }
161164}
162165
@@ -483,6 +486,19 @@ void pe_src_ready_exit(void *obj)
483486 }
484487}
485488
489+ /**
490+ * @brief 8.3.3.2.7 PE_SRC_Disabled State
491+ */
492+ void pe_src_disabled_entry (void * obj )
493+ {
494+ LOG_INF ("PE_SRC_Disabled" );
495+
496+ /*
497+ * Unresponsive to USB Power Delivery messaging, but not to Hard Reset
498+ * Signaling. See pe_got_hard_reset
499+ */
500+ }
501+
486502/**
487503 * @brief 8.3.3.2.11 PE_SRC_Transition_to_default State
488504 */
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ void pe_src_ready_entry(void *obj);
5757void pe_src_ready_run (void * obj );
5858void pe_src_ready_exit (void * obj );
5959
60+ /**
61+ * @brief PE_SRC_Disabled State
62+ */
63+ void pe_src_disabled_entry (void * obj );
64+
6065/**
6166 * @brief PE_SRC_Transition_To_Default State
6267 */
You can’t perform that action at this time.
0 commit comments