diff --git a/zephyr/program/framework/src/cypd_ccg8.c b/zephyr/program/framework/src/cypd_ccg8.c index 7e3738bf6c..c4026e7780 100644 --- a/zephyr/program/framework/src/cypd_ccg8.c +++ b/zephyr/program/framework/src/cypd_ccg8.c @@ -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); @@ -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); } } diff --git a/zephyr/program/framework/src/cypress_pd_common.c b/zephyr/program/framework/src/cypress_pd_common.c index af4bb255c5..961987a27a 100644 --- a/zephyr/program/framework/src/cypress_pd_common.c +++ b/zephyr/program/framework/src/cypress_pd_common.c @@ -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;