Skip to content

Commit 65bb7f0

Browse files
committed
fwk: hang test bin
Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent b950ae6 commit 65bb7f0

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

zephyr/program/lotus/src/cypress_pd_common.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,19 +1224,18 @@ static void perform_error_recovery(int controller)
12241224
if (controller < 2)
12251225
for (i = 0; i < 2; i++) {
12261226
if (!((controller*2 + i) == prev_charge_port &&
1227-
battery_get_disconnect_state() != BATTERY_NOT_DISCONNECTED) &&
1228-
(pd_port_states[i].c_state != CCG_STATUS_NOTHING))
1229-
data[0] = PORT_TO_CONTROLLER_PORT(i);
1230-
cypd_write_reg_block(PORT_TO_CONTROLLER(i),
1231-
CCG_DPM_CMD_REG,
1232-
data, 2);
1227+
battery_get_disconnect_state() != BATTERY_NOT_DISCONNECTED)) {
1228+
data[0] = PORT_TO_CONTROLLER_PORT(i);
1229+
cypd_write_reg_block(PORT_TO_CONTROLLER(i),
1230+
CCG_DPM_CMD_REG,
1231+
data, 2);
1232+
}
12331233
}
12341234
else {
12351235
/* Hard reset all ports that are not supplying power in dead battery mode */
12361236
for (i = 0; i < PD_PORT_COUNT; i++) {
12371237
if (!(i == prev_charge_port &&
1238-
battery_get_disconnect_state() != BATTERY_NOT_DISCONNECTED) &&
1239-
((pd_port_states[i].c_state != CCG_STATUS_NOTHING))) {
1238+
battery_get_disconnect_state() != BATTERY_NOT_DISCONNECTED)) {
12401239

12411240
if ((pd_port_states[i].c_state == CCG_STATUS_SOURCE) &&
12421241
(batt_os_percentage < 30) && (i == prev_charge_port))

0 commit comments

Comments
 (0)