diff options
author | Diana Z <dzigterman@chromium.org> | 2021-12-14 15:46:22 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-16 17:56:16 +0000 |
commit | 694f4345c537a6f628e746fbde25dfb2ae421b5b (patch) | |
tree | aee9a4d828a341ff7c4d0c9b730804fde8292174 | |
parent | ae9ed126ac94477b25fc096d8b90777277e3c82a (diff) | |
download | chrome-ec-694f4345c537a6f628e746fbde25dfb2ae421b5b.tar.gz |
Zephyr: Add configs for TMP112
The TMP112 driver needs a Kconfig, and needs to build in zephyr.
BRANCH=None
BUG=b:195137794
TEST=zmake testall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ief43badb1e80515ccb7fa79c2ada8ec2650672a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3340220
Reviewed-by: 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 79abbf07ff..3e561077f1 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -321,6 +321,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_TMP112 + "${PLATFORM_EC}/driver/temp_sensor/tmp112.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_THROTTLE_AP "${PLATFORM_EC}/common/throttle_ap.c") zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_TIMER diff --git a/zephyr/Kconfig.temperature b/zephyr/Kconfig.temperature index 4af5aa99f8..8426f3e4de 100644 --- a/zephyr/Kconfig.temperature +++ b/zephyr/Kconfig.temperature @@ -31,6 +31,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_TMP112 + bool "TMP112 support" + help + Enables support for the CrosEC TMP112 driver, an i2c peripheral + temperature sensor from TI. + endif # PLATFORM_EC_TEMP_SENSOR diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index d1ec550d3c..1cb552d4bd 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -477,6 +477,11 @@ #define CONFIG_THERMISTOR #endif +#undef CONFIG_TEMP_SENSOR_TMP112 +#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_TMP112 +#define CONFIG_TEMP_SENSOR_TMP112 +#endif + #ifdef CONFIG_PLATFORM_EC_I2C /* Also see shim/include/i2c/i2c.h which defines the ports enum */ #define CONFIG_I2C_CONTROLLER |