Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions zephyr/program/framework/src/cypd_ccg8.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ static void epr_flow_pending_deferred(void)
pd_port_states[port_idx].epr_retry_count = 0;
pd_port_states[port_idx].epr_support = 0;
pd_epr_in_progress &= EPR_PROCESS_MASK;
/* the transition ended, release the transition throttle */
update_pmf_events(BIT(PD_PROGRESS_ENTER_EPR_MODE), 0);
update_pmf_events(BIT(PD_PROGRESS_EXIT_EPR_MODE), 0);
if (charge_port != -1) {
int controller = PORT_TO_CONTROLLER(charge_port);
int port = PORT_TO_CONTROLLER_PORT(charge_port);
Expand Down Expand Up @@ -761,6 +764,9 @@ void cypd_update_epr_state(int controller, int port, int response_len)
#endif
/* EPR fail, do not retry */
pd_port_states[port_idx].epr_active = 0xff;
/* the transition ended, release the transition throttle */
update_pmf_events(BIT(PD_PROGRESS_ENTER_EPR_MODE), 0);
update_pmf_events(BIT(PD_PROGRESS_EXIT_EPR_MODE), 0);
}
}

Expand Down
5 changes: 5 additions & 0 deletions zephyr/program/framework/src/cypress_pd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,11 @@ void cypd_port_int(int controller, int port)
case CCG_RESPONSE_PORT_CONNECT:
CPRINTS("CYPD_RESPONSE_PORT_CONNECT %d", port_idx);
record_ucsi_connector_change_event(controller, port);
#ifdef CONFIG_PD_CCG8_EPR
/* the EPR fail latch applies to the failed connection only */
if (pd_port_states[port_idx].epr_active == 0xff)
pd_port_states[port_idx].epr_active = 0;
#endif
cypd_update_port_state(controller, port);
cypd_evaluate_port_profile(controller, port, data2[0]);
break;
Expand Down