Skip to content

Commit 60d8941

Browse files
committed
fwk: Fix cypress error recovery never sent to port 1+
There was a bug where when looping through the ports for a given controller, it would try to get the controller from the port value. This would always be zero as it is just looping.
1 parent b3120ec commit 60d8941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zephyr/program/framework/src/cypress_pd_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ static void perform_error_recovery(int controller)
14401440
battery_get_disconnect_state() != BATTERY_NOT_DISCONNECTED)) {
14411441

14421442
data[0] = PORT_TO_CONTROLLER_PORT(i);
1443-
cypd_write_reg_block(PORT_TO_CONTROLLER(i),
1443+
cypd_write_reg_block(controller,
14441444
CCG_DPM_CMD_REG,
14451445
data, 2);
14461446
}

0 commit comments

Comments
 (0)