summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.battery
diff options
context:
space:
mode:
authorMichał Barnaś <mb@semihalf.com>2021-10-06 16:13:13 +0200
committerCommit Bot <commit-bot@chromium.org>2021-10-15 17:11:46 +0000
commit0398923c16ee19fd31e1a43ace6d2c29a026c854 (patch)
treec210da96d538ce27e98810b4731cc537f6685766 /zephyr/Kconfig.battery
parentaebcdcde3839c41ba0a68d34e32bf7dd49fe08e9 (diff)
downloadchrome-ec-0398923c16ee19fd31e1a43ace6d2c29a026c854.tar.gz
zephyr: add support for virtual battery
Add Kconfigs to enable virtual battery and set virtual battery address. Change named-i2c from I2C_PORT_VIRTUAL to I2C_PORT_VIRTUAL_BATTERY. BRANCH=main BUG=b:185480578 TEST=When virtual battery is enabled, compilation fails if no virtual battery port is defined in device tree. TEST=Enable virtual battery and verify that its handlers are called properly. Change-Id: Ic88da28dc443beb89a32868d201072f39abb3a86 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3207991 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.battery')
-rw-r--r--zephyr/Kconfig.battery11
1 files changed, 11 insertions, 0 deletions
diff --git a/zephyr/Kconfig.battery b/zephyr/Kconfig.battery
index 02cc19a3f3..77f2086d98 100644
--- a/zephyr/Kconfig.battery
+++ b/zephyr/Kconfig.battery
@@ -98,6 +98,17 @@ config PLATFORM_EC_I2C_VIRTUAL_BATTERY
return desired data to host instead of issuing I2C transaction every
time.
+config PLATFORM_EC_I2C_VIRTUAL_BATTERY_ADDR
+ hex "I2C virtual battery address"
+ default 0x0B if PLATFORM_EC_BATTERY_SMART
+ range 0x00 0x7f
+ depends on PLATFORM_EC_I2C_VIRTUAL_BATTERY
+ help
+ This config sets i2c address that will be intercepted by virtual
+ battery feature. All communication to this port will be cached
+ to decrease i2c communication traffic.
+ This should be equal to the address of real battery.
+
menuconfig PLATFORM_EC_CHARGER
bool "Charging support"
default y