summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-03-04 16:28:45 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-05 01:24:06 +0000
commit146c9b244cbeeacb4f743b67cfea6f00142eaaf6 (patch)
treeb77723ef4da40c2f60a0d49d6827b8d39b335718
parentb9a62c42aa1fbe55a9eabf04b2650b1c3dcabd66 (diff)
downloadchrome-ec-146c9b244cbeeacb4f743b67cfea6f00142eaaf6.tar.gz
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 <dzigterman@chromium.org> Change-Id: Ic07a9c5ab35a9edd29717beb7acc9e1c51159b04 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738055 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/galtic/board.c2
1 files changed, 1 insertions, 1 deletions
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,