summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/CMakeLists.txt
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2021-02-05 13:04:18 +0100
committerCommit Bot <commit-bot@chromium.org>2021-02-17 06:49:23 +0000
commitfe93af445598a7d42615ce8a0e7c9d8d0f862ac1 (patch)
tree1bdc7d740b6afaa190dfc2fe8b58f7e7d04d7cd6 /zephyr/shim/src/CMakeLists.txt
parent2adcac085e240c00d4b32ba11404e98be36f1ee9 (diff)
downloadchrome-ec-fe93af445598a7d42615ce8a0e7c9d8d0f862ac1.tar.gz
zephyr: add shim temperature sensors
Add temperature sensors shim. Use platform/ec the temperature sensors drivers. Generate needed global variables/types: enum temp_sensor_id and temp_sensors from dts. Each temperature sensor type has its own compatible property to assign a correct read function in the temp_sensor_t temp_sensors[] array. Themrmisors has also adc property to point an ADC channel connected to the sensor. Enable "temps" console command and EC_CMD_TEMP_SENSOR_GET_INFO host command. BUG=b:174851465 BRANCH=none TEST=build Zephyr TEST=Run "temps" command, it should return the current temperature measurements Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ie680ec0771ea3da598066eb98db80944a93daca5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2687218 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/shim/src/CMakeLists.txt')
-rw-r--r--zephyr/shim/src/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/zephyr/shim/src/CMakeLists.txt b/zephyr/shim/src/CMakeLists.txt
index a6a0670b19..aba067bca7 100644
--- a/zephyr/shim/src/CMakeLists.txt
+++ b/zephyr/shim/src/CMakeLists.txt
@@ -27,6 +27,7 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC_MPU mpu.c)
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_PANIC panic.c)
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_PWM pwm.c)
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_RTC rtc.c)
+zephyr_sources_ifdef(CONFIG_PLATFORM_EC_TEMP_SENSOR temp_sensors.c)
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_TIMER hwtimer.c)
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_I2C i2c.c)
zephyr_sources_ifdef(CONFIG_SHIMMED_TASKS tasks.c)