diff options
author | Ting Shen <phoenixshen@google.com> | 2019-08-01 14:26:01 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-02 13:18:48 +0000 |
commit | f9176d199fd70e512d1050a736909f9114b80291 (patch) | |
tree | 0d0332fdcca2376f348276b087befd7c1d7c82b6 /board/kukui | |
parent | d4ff5c13b13437e643d4f6642198ef214d71e5a0 (diff) | |
download | chrome-ec-f9176d199fd70e512d1050a736909f9114b80291.tar.gz |
kukui: fix incorrect input power limit
This CL includes two major changes:
- set input current in board_set_charge_limit() instead of
charger_profile_override().
- remove board revision constraint, apply the fix to all kukui/kranes.
BUG=b:134227872
TEST=manually, boot with new fw and measure the power.
BRANCH=master
Change-Id: Ib826e805990fe3e9af5a88c231825bd477592e49
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1730378
Reviewed-by: Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/kukui')
-rw-r--r-- | board/kukui/board.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/board/kukui/board.c b/board/kukui/board.c index 49d5e53cd0..9d6d3232e3 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -175,8 +175,13 @@ 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) { - charge_set_input_current_limit(MAX(charge_ma, - CONFIG_CHARGER_INPUT_CURRENT), charge_mv); + /* b/134227872: Limit input current to 2A in S0 to prevent overheat */ + if (power_get_state() == POWER_S0) + charge_set_input_current_limit(MIN(charge_ma, 2000), charge_mv); + else + charge_set_input_current_limit( + MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), + charge_mv); } int board_discharge_on_ac(int enable) |