diff options
author | Diana Z <dzigterman@chromium.org> | 2021-10-01 15:07:26 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-01 22:40:20 +0000 |
commit | b3278987e1f12943818984870627d8faa6d14b69 (patch) | |
tree | 94257ff15e27ac73460970eb4fb2eaa4c37cb551 | |
parent | 3de402e96c1ec4bf0d6a9d41a9294f9343ac6416 (diff) | |
download | chrome-ec-b3278987e1f12943818984870627d8faa6d14b69.tar.gz |
Zephyr: Separate charger and battery config options
Decouple the charger and battery configs, to allow boards to add
components in smaller increments.
BRANCH=None
BUG=b:195137794
TEST=zmake testall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ia4677f5c91851346acf15e6627c280e56d62cde1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3200067
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | zephyr/Kconfig.battery | 28 | ||||
-rw-r--r-- | zephyr/Kconfig.usbc | 15 |
2 files changed, 27 insertions, 16 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery index add095ce8e..44341d184d 100644 --- a/zephyr/Kconfig.battery +++ b/zephyr/Kconfig.battery @@ -4,7 +4,6 @@ menuconfig PLATFORM_EC_BATTERY bool "Battery support" - select HAS_TASK_CHARGER help Enables battery support on the board. Requires selection of a battery and a charger IC. @@ -99,6 +98,31 @@ config PLATFORM_EC_I2C_VIRTUAL_BATTERY return desired data to host instead of issuing I2C transaction every time. +menuconfig PLATFORM_EC_CHARGER + bool "Charging support" + default y + select HAS_TASK_CHARGER + help + Enable the EC charging task. This enables compilation of the + charge_state_v2 code. + +if PLATFORM_EC_CHARGER + +config PLATFORM_EC_CHARGE_MANAGER + bool "Charge manager" + default y + help + The EC charge manager manages charging the battery from all supported + power sources. This includes dedicated charge ports (such as a + barrel jack connector), BC1.2 (Battery Charging 1.2) sources, and + USB-C sources. When multiple charge sources are connected to a + Chromebook simultaneously, the charge manager is responsible for + picking the best source. + + Note that the charge manager assumes that at least one USB-C power + source is available on the hardware, so cannot be built without + PLATFORM_EC_USBC. + config PLATFORM_EC_CHARGER_ISL9237 bool "Use the ISL9237 charger" depends on PLATFORM_EC_I2C @@ -402,6 +426,8 @@ config PLATFORM_EC_CONSOLE_CMD_CHGRAMP OC 1: s0 oc_det0 icl0 OC 2: s0 oc_det0 icl0 +endif # PLATFORM_EC_CHARGER + config PLATFORM_EC_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF bool "Enable battery cut off on critical power level" help diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index ee79eb1d04..6e952ea318 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -43,21 +43,6 @@ menuconfig PLATFORM_EC_USBC if PLATFORM_EC_USBC -config PLATFORM_EC_CHARGE_MANAGER - bool "Charge manager" - default y - help - The EC charge manager manages charging the battery from all supported - power sources. This includes dedicated charge ports (such as a - barrel jack connector), BC1.2 (Battery Charging 1.2) sources, and - USB-C sources. When multiple charge sources are connected to a - Chromebook simultaneously, the charge manager is responsible for - picking the best source. - - Note that the charge manager assumes that at least one USB-C power - source is available on the hardware, so cannot be built without - PLATFORM_EC_USBC. - config PLATFORM_EC_CHARGER_INPUT_CURRENT int "Charger input current in mA" depends on PLATFORM_EC_CHARGE_MANAGER |