From 8be870863a92c450b6ef5c6f736f88912bbcca24 Mon Sep 17 00:00:00 2001 From: Jacky Wang Date: Tue, 3 May 2022 17:50:58 +0800 Subject: galtic: Modify board active charge port setting. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the charge port does not change, we don’t need to stop the charge IC. BUG=b:229953914 BRANCH=firmware-dedede-13606.B TEST=make BOARD=galtic 1. system battery cutoff (Run command ectool batterycutoff) 2. wait about 5 min 3. Plug-AC on TypeC port1. 4. Run ectool battery and check present current. Signed-off-by: Jacky Wang Change-Id: I8afeee2974752aa891c54662a9341c53c651148a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621595 Tested-by: Michael5 Chen Reviewed-by: Michael5 Chen Commit-Queue: Ivan Chen Reviewed-by: Ivan Chen --- 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 a1605303cd..47cf77202c 100644 --- a/board/galtic/board.c +++ b/board/galtic/board.c @@ -579,7 +579,7 @@ int board_set_active_charge_port(int port) * Stop the charger IC from switching while changing ports. Otherwise, * we can overcurrent the adapter we're switching to. (crbug.com/926056) */ - if (old_port != CHARGE_PORT_NONE) + if ((old_port != CHARGE_PORT_NONE) && (old_port != port)) charger_discharge_on_ac(1); /* Enable requested charge port. */ -- cgit v1.2.1