diff options
author | Mike Lee <mike5@huaqin.corp-partner.google.com> | 2021-09-17 12:58:37 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-17 18:45:13 +0000 |
commit | abc448dfbb68b8b94fbfaf1e8193d44b44cf1107 (patch) | |
tree | e249a07086c052f24fbc99eb57d047601320918d /board/storo/board.c | |
parent | 4f5a9d9e1a1724bfb92823cdb94f7d87217d5953 (diff) | |
download | chrome-ec-abc448dfbb68b8b94fbfaf1e8193d44b44cf1107.tar.gz |
Storo: Modify active charge port setting
If the port is not changing, should not be doing anything.
In order to solve the problem of sometimes unable to boot
under AC only state, we can make a return early.
BUG=b:197199689
BRANCH=dedede
TEST=make BOARD=storo pass, the DUT can boot up normally
when only the 45W adapter is inserted
Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Change-Id: Icec7a5e9a0ed6efdd41489b4fd3e74325f4b81fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3167617
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/storo/board.c')
-rw-r--r-- | board/storo/board.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/storo/board.c b/board/storo/board.c index ab920e0592..4981bedc8e 100644 --- a/board/storo/board.c +++ b/board/storo/board.c @@ -461,6 +461,10 @@ int board_set_active_charge_port(int port) old_port = charge_manager_get_active_charge_port(); + /* If the port is not changing, we should do nothing */ + if (old_port == port) + return EC_SUCCESS; + CPRINTS("New chg p%d", port); /* Disable all ports. */ |