Skip to content

Commit 5e85a39

Browse files
committed
fix no charging after hard reset
System would stop charging after multiport adapters issue a hard reset. Signed-off-by: Kieran Levin <ktl@frame.work>
1 parent 8ddab0f commit 5e85a39

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

zephyr/program/lotus/src/cypress_pd_common.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,9 @@ void cypd_port_int(int controller, int port)
16371637
case CCG_RESPONSE_PORT_DISCONNECT:
16381638
record_ucsi_connector_change_event(controller, port);
16391639
__fallthrough;
1640+
case CCG_RESPONSE_HARD_RESET_RX:
16401641
case CCG_RESPONSE_TYPE_C_ERROR_RECOVERY:
1641-
CPRINTS("CYPD_RESPONSE_PORT_DISCONNECT");
1642+
CPRINTS("TYPE_C_ERROR_RECOVERY");
16421643
cypd_update_port_state(controller, port);
16431644
cypd_release_port(controller, port);
16441645
/* make sure the type-c state is cleared */
@@ -1923,6 +1924,11 @@ int board_set_active_charge_port(int charge_port)
19231924
CPRINTS("%s port %d, prev:%d", __func__, charge_port, prev_charge_port);
19241925

19251926
if (prev_charge_port == charge_port) {
1927+
/* in the case of hard reset, we do not turn off the old
1928+
* port, but the PD will implicitly clear the port
1929+
* so we need to turn on the vbus control again.
1930+
*/
1931+
cypd_cfet_vbus_control(charge_port, true, true);
19261932
return EC_SUCCESS;
19271933
}
19281934

0 commit comments

Comments
 (0)