summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-06-30 14:14:22 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-11 06:05:19 +0000
commit7e50f69303fc74562dfede6c7a3f61713814a82c (patch)
tree8ff03665ed8ca13665668d660590c3b79f28bdfe /baseboard
parent834aa957e6c3d3eb30e7760ef14ef722cf8009bd (diff)
downloadchrome-ec-7e50f69303fc74562dfede6c7a3f61713814a82c.tar.gz
Charger: Add dynamic charger chip count
Different DB options may cause different numbers of charger chips to be present on the system. Remove constant count for charger chips, and instead always call into the overridable function to query the count. BRANCH=None BUG=b:155963446 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0e65b8af351ecabe6f7b823e0e56f1932cc280a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277833 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/dragonegg/baseboard.c1
-rw-r--r--baseboard/grunt/baseboard.c2
-rw-r--r--baseboard/hatch/baseboard.c1
-rw-r--r--baseboard/kukui/baseboard.c2
-rw-r--r--baseboard/octopus/baseboard.c2
-rw-r--r--baseboard/trogdor/baseboard.c2
-rw-r--r--baseboard/volteer/baseboard.c2
-rw-r--r--baseboard/zork/variant_dalboz.c2
-rw-r--r--baseboard/zork/variant_trembyle.c1
9 files changed, 0 insertions, 15 deletions
diff --git a/baseboard/dragonegg/baseboard.c b/baseboard/dragonegg/baseboard.c
index e737530570..5841bef1b1 100644
--- a/baseboard/dragonegg/baseboard.c
+++ b/baseboard/dragonegg/baseboard.c
@@ -89,7 +89,6 @@ const struct charger_config_t chg_chips[] = {
.drv = &bq25710_drv,
},
};
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
/******************************************************************************/
/* PWROK signal configuration */
diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c
index 26b9ac5bae..a6192e8789 100644
--- a/baseboard/grunt/baseboard.c
+++ b/baseboard/grunt/baseboard.c
@@ -370,8 +370,6 @@ const struct charger_config_t chg_chips[] = {
},
};
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
-
const int usb_port_enable[USB_PORT_COUNT] = {
GPIO_EN_USB_A0_5V,
diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c
index 07b018443e..841f398b9b 100644
--- a/baseboard/hatch/baseboard.c
+++ b/baseboard/hatch/baseboard.c
@@ -83,7 +83,6 @@ const struct charger_config_t chg_chips[] = {
.drv = &bq25710_drv,
},
};
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
/******************************************************************************/
/* Chipset callbacks/hooks */
diff --git a/baseboard/kukui/baseboard.c b/baseboard/kukui/baseboard.c
index 0d88f21510..baf915407a 100644
--- a/baseboard/kukui/baseboard.c
+++ b/baseboard/kukui/baseboard.c
@@ -35,8 +35,6 @@ const struct charger_config_t chg_chips[] = {
};
#endif /* VARIANT_KUKUI_CHARGER_* */
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
-
#endif /* CONFIG_CHARGER_RUNTIME_CONFIG */
void board_reset_pd_mcu(void)
diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c
index bea8447ef3..105a3bf71c 100644
--- a/baseboard/octopus/baseboard.c
+++ b/baseboard/octopus/baseboard.c
@@ -88,8 +88,6 @@ const struct charger_config_t chg_chips[] = {
.drv = &isl923x_drv,
},
};
-
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
#endif
/******************************************************************************/
diff --git a/baseboard/trogdor/baseboard.c b/baseboard/trogdor/baseboard.c
index 4f112d8e5c..2b59d87c87 100644
--- a/baseboard/trogdor/baseboard.c
+++ b/baseboard/trogdor/baseboard.c
@@ -75,5 +75,3 @@ const struct charger_config_t chg_chips[] = {
.drv = &isl923x_drv,
},
};
-
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c
index 7213ff7137..8a12c6576e 100644
--- a/baseboard/volteer/baseboard.c
+++ b/baseboard/volteer/baseboard.c
@@ -122,8 +122,6 @@ const struct charger_config_t chg_chips[] = {
},
};
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
-
/******************************************************************************/
/*
* PWROK signal configuration, see the PWROK Generation Flow Diagram (Figure
diff --git a/baseboard/zork/variant_dalboz.c b/baseboard/zork/variant_dalboz.c
index 1f990737c6..a9ce52daf1 100644
--- a/baseboard/zork/variant_dalboz.c
+++ b/baseboard/zork/variant_dalboz.c
@@ -150,5 +150,3 @@ const struct charger_config_t chg_chips[] = {
.drv = &isl9241_drv,
},
};
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
-
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 71816c6e45..5a6151ed5f 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -102,7 +102,6 @@ struct charger_config_t chg_chips[] = {
.drv = &isl9241_drv,
},
};
-const unsigned int chg_cnt = ARRAY_SIZE(chg_chips);
/*
* If the charger is found on the V0 I2C port then re-map the port.