summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-30 12:04:57 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-06 20:47:07 +0000
commit81341cc6e21b5086c75e975e45fb5c3a83673dbd (patch)
tree813d14caf68838b44221dd70719229e370694ce8
parent030fed0434e484f885e83f2f148c21ad3ec5dfc1 (diff)
downloadchrome-ec-81341cc6e21b5086c75e975e45fb5c3a83673dbd.tar.gz
Split out charger information into a new file
The Zephyr build needs this information but cannot use the whole baseboard.c file. It is pretty big anyway, so let's move the charger info into a separate file. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ib91ae850358e5045e6530e2308a49835aee6a3f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607507 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--baseboard/volteer/baseboard.c10
-rw-r--r--baseboard/volteer/build.mk1
-rw-r--r--baseboard/volteer/charger.c18
3 files changed, 19 insertions, 10 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c
index a9993c2c1f..85af33a202 100644
--- a/baseboard/volteer/baseboard.c
+++ b/baseboard/volteer/baseboard.c
@@ -76,16 +76,6 @@ const enum gpio_signal hibernate_wake_pins[] = {
const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);
/******************************************************************************/
-/* Charger Chip Configuration */
-const struct charger_config_t chg_chips[] = {
- {
- .i2c_port = I2C_PORT_CHARGER,
- .i2c_addr_flags = ISL9241_ADDR_FLAGS,
- .drv = &isl9241_drv,
- },
-};
-
-/******************************************************************************/
/*
* PWROK signal configuration, see the PWROK Generation Flow Diagram (Figure
* 235) in the Tiger Lake Platform Design Guide for the list of potential
diff --git a/baseboard/volteer/build.mk b/baseboard/volteer/build.mk
index 4ab5739836..5bb01f6abc 100644
--- a/baseboard/volteer/build.mk
+++ b/baseboard/volteer/build.mk
@@ -8,6 +8,7 @@
baseboard-y=baseboard.o
baseboard-y+=battery_presence.o
+baseboard-y+=charger.o
baseboard-y+=usb_pd_policy.o
baseboard-y+=cbi_ec_fw_config.o
baseboard-y+=cbi_ssfc.o
diff --git a/baseboard/volteer/charger.c b/baseboard/volteer/charger.c
new file mode 100644
index 0000000000..c3f26dc081
--- /dev/null
+++ b/baseboard/volteer/charger.c
@@ -0,0 +1,18 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Volteer family-specific configuration */
+#include "common.h"
+#include "charger.h"
+#include "driver/charger/isl9241.h"
+
+/* Charger Chip Configuration */
+const struct charger_config_t chg_chips[] = {
+ {
+ .i2c_port = I2C_PORT_CHARGER,
+ .i2c_addr_flags = ISL9241_ADDR_FLAGS,
+ .drv = &isl9241_drv,
+ },
+};