diff options
author | YB.Ha <ybha@samsung.com> | 2017-12-11 11:40:27 +0900 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-12-13 22:33:27 -0800 |
commit | 313ea684c37a5f21d46304ed9f6515362d003544 (patch) | |
tree | d73ccdeb2dff2f4acaedcefc9808448eaa08fde9 /board/nautilus | |
parent | 81ca8fc4b82f3648b52fdd8415f8e8af95081298 (diff) | |
download | chrome-ec-313ea684c37a5f21d46304ed9f6515362d003544.tar.gz |
nautilus: Limit input current to fraction of negotiated limit
Limit input current to 96% of negotiated limit
BUG=b:70481533
BRANCH=none
TEST=build/flash nautilus, connect adapter and check input current
Change-Id: I20e250d8a37f22b471a69329b2e74da2c7ff2763
Reviewed-on: https://chromium-review.googlesource.com/818844
Commit-Ready: YongBeum Ha <ybha@samsung.com>
Tested-by: YongBeum Ha <ybha@samsung.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board/nautilus')
-rw-r--r-- | board/nautilus/board.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/nautilus/board.c b/board/nautilus/board.c index ecf29c668d..165a5b9597 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -502,6 +502,11 @@ int board_set_active_charge_port(int charge_port) void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, int charge_mv) { + /* + * Limit the input current to 96% negotiated limit, + * to account for the charger chip margin. + */ + charge_ma = charge_ma * 96 / 100; charge_set_input_current_limit(MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv); } |