From 84330af47220cbc82537fc8cdae924531d3f2961 Mon Sep 17 00:00:00 2001 From: Bruce Date: Tue, 14 Mar 2017 14:03:58 +0800 Subject: pyro: limit max input current for safety Max = Max * 95% Follow reef setting. BUG=none BRANCH=reef TEST=make buildall Change-Id: Ifa57171114f38640fbe868e7042b3962eab284e0 Signed-off-by: Bruce.Wan Reviewed-on: https://chromium-review.googlesource.com/454776 Reviewed-by: Daisuke Nojiri Commit-Queue: Keith Tzeng Tested-by: Keith Tzeng --- board/pyro/board.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/pyro/board.c b/board/pyro/board.c index 2cd17093f2..8218809b25 100644 --- a/board/pyro/board.c +++ b/board/pyro/board.c @@ -623,6 +623,7 @@ void board_set_charge_limit(int port, int supplier, int charge_ma, if (bd9995x_bc12_enable_charging(port, bc12_enable)) return; + charge_ma = (charge_ma * 95) / 100; charge_set_input_current_limit(MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv); } -- cgit v1.2.1