diff options
author | Michał Barnaś <mb@semihalf.com> | 2021-08-19 15:06:15 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-03 21:31:09 +0000 |
commit | b67bda916d68b3f0748bb6d174151192a0d4395e (patch) | |
tree | b7998fb8bace6832cb1359de8e1359cd8409d453 /zephyr/projects/asurada | |
parent | 017ff2201868caa3d55e3e929a070533693f8148 (diff) | |
download | chrome-ec-b67bda916d68b3f0748bb6d174151192a0d4395e.tar.gz |
zephyr: define hayato's batteries in device tree and change enum name
This commit adds asurada/hayato's batteries definitions to device tree
and removes old battery.c usage in Zephyr.
BRANCH=main
BUG=b:183544739
TEST=Compile and flash CrOS EC firmware to hayato.
It should work the same as without this commit.
TEST=Compile and flash Zephyr, battery should be detected
correctly and its model should be logged in EC console.
Change-Id: I009a1b6d25e72e1c0145f5e8dda38243dfb9a8c8
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107389
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects/asurada')
-rw-r--r-- | zephyr/projects/asurada/hayato/CMakeLists.txt | 3 | ||||
-rw-r--r-- | zephyr/projects/asurada/hayato/battery.dts | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/zephyr/projects/asurada/hayato/CMakeLists.txt b/zephyr/projects/asurada/hayato/CMakeLists.txt index f6d4eba58f..d18e8f20ba 100644 --- a/zephyr/projects/asurada/hayato/CMakeLists.txt +++ b/zephyr/projects/asurada/hayato/CMakeLists.txt @@ -22,8 +22,5 @@ zephyr_library_sources( "${PLATFORM_EC_BASEBOARD}/usbc_config.c" "${PLATFORM_EC_BASEBOARD}/usb_pd_policy.c") -zephyr_library_sources( - "${PLATFORM_EC_BOARD}/battery.c") - zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_I2C "src/i2c.c") diff --git a/zephyr/projects/asurada/hayato/battery.dts b/zephyr/projects/asurada/hayato/battery.dts index abc22b4383..deb803bb8c 100644 --- a/zephyr/projects/asurada/hayato/battery.dts +++ b/zephyr/projects/asurada/hayato/battery.dts @@ -4,11 +4,9 @@ */ / { - named-batteries { - compatible = "named-batteries"; - - c235 { - enum-name = "c235"; + batteries { + default_battery: c235 { + compatible = "as3gwrc3ka,c235-41"; }; }; }; |