summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommy Chung <tommy.chung@quanta.corp-partner.google.com>2022-06-24 19:23:09 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 12:04:44 +0000
commit8e5e37d533158d30f2daad9dc454dc8fa875fd77 (patch)
treeaa850d261de6c5b21784d867d443ec7a01b17335
parentf22ff9f99f8fec3e5ecfff9dee21b0f7f78b2f82 (diff)
downloadchrome-ec-8e5e37d533158d30f2daad9dc454dc8fa875fd77.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> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3734353 Commit-Queue: Ting Shen <phoenixshen@chromium.org>
-rw-r--r--baseboard/cherry/baseboard.c7
-rw-r--r--board/cherry/board.c9
-rw-r--r--board/dojo/board.c9
3 files changed, 18 insertions, 7 deletions
diff --git a/baseboard/cherry/baseboard.c b/baseboard/cherry/baseboard.c
index 197010bded..55dd5612b4 100644
--- a/baseboard/cherry/baseboard.c
+++ b/baseboard/cherry/baseboard.c
@@ -368,13 +368,6 @@ void board_reset_pd_mcu(void)
/* C1: Add code if TCPC chips need a reset */
}
-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);
-}
-
void board_pd_vconn_ctrl(int port, enum usbpd_cc_pin cc_pin, int enabled)
{
/*
diff --git a/board/cherry/board.c b/board/cherry/board.c
index 69828d19b5..8160dafa62 100644
--- a/board/cherry/board.c
+++ b/board/cherry/board.c
@@ -4,6 +4,8 @@
*/
/* Cherry board configuration */
+#include "charge_manager.h"
+#include "charge_state_v2.h"
#include "common.h"
#include "console.h"
#include "driver/accel_bma422.h"
@@ -263,6 +265,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)
{
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)
{