diff options
author | Diana Z <dzigterman@chromium.org> | 2022-01-14 15:14:48 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-18 17:12:24 +0000 |
commit | e07f7256276c918f27da9166c040c0ce06ff2923 (patch) | |
tree | 1422e26aff5050f7929d24e4ae9ba2a8fec1682d | |
parent | 80f52feb23c5b034d81b04b68b982ab4be7bba3e (diff) | |
download | chrome-ec-e07f7256276c918f27da9166c040c0ce06ff2923.tar.gz |
Zephyr: Include build support for PCT2075
Introduce the Kconfig and build support needed to use the PCT2075
driver.
BRANCH=None
BUG=b:208515128
TEST=zmake testall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie60e133ef948de80ca018943687358dfef4728ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390523
Reviewed-by: Keith Short <keithshort@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 534db9822a..d733121c18 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_PCT2075 + "${PLATFORM_EC}/driver/temp_sensor/pct2075.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 diff --git a/zephyr/Kconfig.temperature b/zephyr/Kconfig.temperature index 8095c81823..a3ff8f12cf 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_PCT2075 + bool "PCT2075 support" + help + Enables support for the CrosEC PCT2075 sensor, an i2c peripheral + temperature sensor from NXP. + config PLATFORM_EC_TEMP_SENSOR_SB_TSI bool "SB TSI support" help diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 1f0a2b4156..593bed5476 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_PCT2075 +#ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_PCT2075 +#define CONFIG_TEMP_SENSOR_PCT2075 +#endif + #undef CONFIG_TEMP_SENSOR_SB_TSI #ifdef CONFIG_PLATFORM_EC_TEMP_SENSOR_SB_TSI #define CONFIG_TEMP_SENSOR_SB_TSI |