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] = {
1371
1371
pe_src_ready_exit ,
1372
1372
NULL ,
1373
1373
NULL ),
1374
+ [PE_SRC_DISABLED ] = SMF_CREATE_STATE (
1375
+ pe_src_disabled_entry ,
1376
+ NULL ,
1377
+ NULL ,
1378
+ NULL ,
1379
+ NULL ),
1374
1380
[PE_SRC_TRANSITION_TO_DEFAULT ] = SMF_CREATE_STATE (
1375
1381
pe_src_transition_to_default_entry ,
1376
1382
pe_src_transition_to_default_run ,
Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ enum usbc_pe_state {
83
83
PE_SRC_TRANSITION_SUPPLY ,
84
84
/** PE_SRC_Ready */
85
85
PE_SRC_READY ,
86
+ /** PE_SRC_Disabled */
87
+ PE_SRC_DISABLED ,
86
88
/** PE_SRC_Hard_Reset */
87
89
PE_SRC_HARD_RESET ,
88
90
/** 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)
154
154
* 1) The SourceCapabilityTimer times out
155
155
* 2) And CapsCounter ≤ nCapsCount
156
156
*/
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
+ }
160
163
}
161
164
}
162
165
@@ -483,6 +486,19 @@ void pe_src_ready_exit(void *obj)
483
486
}
484
487
}
485
488
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
+
486
502
/**
487
503
* @brief 8.3.3.2.11 PE_SRC_Transition_to_default State
488
504
*/
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ void pe_src_ready_entry(void *obj);
57
57
void pe_src_ready_run (void * obj );
58
58
void pe_src_ready_exit (void * obj );
59
59
60
+ /**
61
+ * @brief PE_SRC_Disabled State
62
+ */
63
+ void pe_src_disabled_entry (void * obj );
64
+
60
65
/**
61
66
* @brief PE_SRC_Transition_To_Default State
62
67
*/
You can’t perform that action at this time.
0 commit comments