From 146c9b244cbeeacb4f743b67cfea6f00142eaaf6 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Thu, 4 Mar 2021 16:28:45 -0700 Subject: Galtic: Correct active charge port selection During active charge port selection, any port which is not the new active port should have sinking disabled. The current code could leave sinking enabled on C0 when a better charger is inserted into C1, and also shuts off C1 when it is selected with no battery. BRANCH=None BUG=b:176214112 TEST=on galtic, sysjump with no battery and a charger in C1. Observe no brown outs Signed-off-by: Diana Z Change-Id: Ic07a9c5ab35a9edd29717beb7acc9e1c51159b04 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738055 Reviewed-by: Aseda Aboagye Commit-Queue: Aseda Aboagye --- board/galtic/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/galtic/board.c b/board/galtic/board.c index 01a9462230..2dfc74bbd4 100644 --- a/board/galtic/board.c +++ b/board/galtic/board.c @@ -533,7 +533,7 @@ int board_set_active_charge_port(int port) * requested charge port. */ for (i = 0; i < board_get_usb_pd_port_count(); i++) { - if (port == 0) + if (port == i) continue; if (tcpc_write(i, TCPC_REG_COMMAND, -- cgit v1.2.1