diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-02-17 12:15:21 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-23 19:29:13 +0000 |
commit | a5a81dca4579961b9d78c7c85442d76b3c87dbbb (patch) | |
tree | c702e09f5137ecab4b8b69b5982543bf9a9f3e63 /zephyr/CMakeLists.txt | |
parent | 25fa055c3ecd98c5d339cc4002054c584f99cb1b (diff) | |
download | chrome-ec-a5a81dca4579961b9d78c7c85442d76b3c87dbbb.tar.gz |
zephyr: add shim thermal support
Add thermal support to Zephyr which includes handling temperature
threshold for certain events. The thresholds are defined in the dts
file as temperature sensor parameters - there are limits per
temperature sensor. The struct ec_thermal_config thermal_params[] array
with all parameters is generated automatically based on
named_temp_sensors node.
Enable "thermalget" and "thermalset" console commands along with
EC_CMD_THERMAL_GET_THRESHOLD and EC_CMD_THERMAL_SET_THRESHOLD host
commands.
Also, add a few functions to utils needed to verify if an event
occurred (falling/rising edge).
BUG=b:179886912
BRANCH=none
TEST=build Zephyr
TEST=Run "thermalget" command to check current thresholds.
Change the thresholds with "thermalset" to verify if AP throttling
is requested.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I5f527ceecab2427b3034fd8baa62bb8482f99ff3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2698845
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/CMakeLists.txt')
-rw-r--r-- | zephyr/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 8a7359ec65..855bd1d753 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -256,6 +256,7 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC_SPI_FLASH_REGS zephyr_sources_ifdef(CONFIG_PLATFORM_EC_TABLET_MODE "${PLATFORM_EC}/common/tablet_mode.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_TEMP_SENSOR + "${PLATFORM_EC}/common/thermal.c" "${PLATFORM_EC}/common/temp_sensor.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_THERMISTOR "${PLATFORM_EC}/driver/temp_sensor/thermistor.c") |