diff options
author | Diana Z <dzigterman@chromium.org> | 2021-12-15 13:47:09 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-15 02:38:26 +0000 |
commit | b6d41178f63ea2d930327af5c8015f4db6c74f5c (patch) | |
tree | 70cdbcaba3c761b439ef5fb42f64a6bfbc332264 | |
parent | ade78132bcaac0c6b1e6eaf3689231e9f5b99ae9 (diff) | |
download | chrome-ec-b6d41178f63ea2d930327af5c8015f4db6c74f5c.tar.gz |
Zephyr: Include build support for SB TSI
Introduce the Kconfig and build support needed to use the SB TSI driver.
BRANCH=None
BUG=b:195137794
TEST=zmake testall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie9544df827197b7085e35fdc5f6edc5f2844046f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384484
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | zephyr/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/Kconfig.temperature | 6 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 54c15da84d..534db9822a 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -331,6 +331,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_TEMP_SENSOR "${PLATFORM_EC}/common/temp_sensor.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_THERMISTOR "${PLATFORM_EC}/driver/temp_sensor/thermistor.c") +zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_TEMP_SENSOR_SB_TSI + "${PLATFORM_EC}/driver/temp_sensor/sb_tsi.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_TEMP_SENSOR_TMP112 "${PLATFORM_EC}/driver/temp_sensor/tmp112.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_THROTTLE_AP diff --git a/zephyr/Kconfig.temperature b/zephyr/Kconfig.temperature index 8affeae907..8095c81823 100644 --- a/zephyr/Kconfig.temperature +++ b/zephyr/Kconfig.temperature @@ -38,6 +38,12 @@ config PLATFORM_EC_THERMISTOR Enables support for thermistors (resistor whose resistance is strongly dependent on temperature) as temperature-sensor type. +config PLATFORM_EC_TEMP_SENSOR_SB_TSI + bool "SB TSI support" + help + Enables support for the Side Band Temperature Sensor Interface, + an i2c peripheral available on AMD platforms. + config PLATFORM_EC_TEMP_SENSOR_TMP112 bool "TMP112 support" help diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index b43cdb3694..1f0a2b4156 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -523,6 +523,11 @@ #define CONFIG_THERMISTOR #endif +#undef CONFIG_TEMP_SENSOR_SB_TSI +#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_SB_TSI +#define CONFIG_TEMP_SENSOR_SB_TSI +#endif + #undef CONFIG_TEMP_SENSOR_TMP112 #ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_TMP112 #define CONFIG_TEMP_SENSOR_TMP112 |