diff options
author | Tommy Chung <tommy.chung@quanta.corp-partner.google.com> | 2022-06-24 19:23:09 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-29 07:54:42 +0000 |
commit | e69ca7b12399147aa0edf9da7ed6d1da8fbe9823 (patch) | |
tree | d42d9b07ae0af7d37a3a491bf4f1f4f574be1fe7 /board/dojo | |
parent | 7e205f695942520da6c9df717e410315fb9768d4 (diff) | |
download | chrome-ec-e69ca7b12399147aa0edf9da7ed6d1da8fbe9823.tar.gz |
cherry/dojo: Move board_set_charge_limit to board level
BUG=none
BRANCH=cherry
TEST=make BOARD=cherry, dojo
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: I5868ce77b6d85b9755e74c16e9430224bdfe8dde
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3721949
Reviewed-by: Devin Lu <devin.lu@quantatw.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/dojo')
-rw-r--r-- | board/dojo/board.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/dojo/board.c b/board/dojo/board.c index 4d7178bfad..bb819b02d5 100644 --- a/board/dojo/board.c +++ b/board/dojo/board.c @@ -5,6 +5,8 @@ /* Dojo board configuration */ #include "cbi_fw_config.h" +#include "charge_manager.h" +#include "charge_state_v2.h" #include "common.h" #include "console.h" #include "cros_board_info.h" @@ -375,6 +377,13 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; +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); +} + /* Initialize board. */ static void board_init(void) { |