diff options
author | Jeremy Bettis <jbettis@google.com> | 2021-12-06 10:26:58 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-06 18:30:16 +0000 |
commit | f4320b6036c855abba96191f53928e54529f91ea (patch) | |
tree | 47abd80d954982694894be52a30f3a073c00c928 | |
parent | 12f8e676623c9d46be650f12c3bff13244336e2d (diff) | |
download | chrome-ec-f4320b6036c855abba96191f53928e54529f91ea.tar.gz |
zephyr: Disable DPTF on nivviks
Add a static assert to catch DPTF being used without temp sensors
defined in the dts.
Disable DPTF on nivviks.
This fixes a build error on gitlab.
https://gitlab.com/zephyr-ec/ec/-/pipelines/422163729
BRANCH=None
BUG=b:201000681
TEST=zmake configure --build nivviks
Change-Id: I273a7267783f119391d1d739c598ed2a059d1286
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3317781
Reviewed-by: Yuval Peress <peress@google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | common/dptf.c | 2 | ||||
-rw-r--r-- | zephyr/projects/nissa/prj_nivviks.conf | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/common/dptf.c b/common/dptf.c index 33a42ba5af..12864d8367 100644 --- a/common/dptf.c +++ b/common/dptf.c @@ -28,6 +28,8 @@ static struct { int temp; /* degrees K, negative for disabled */ cond_t over; /* watch for crossings */ } dptf_threshold[TEMP_SENSOR_COUNT][DPTF_THRESHOLDS_PER_SENSOR]; +_STATIC_ASSERT(TEMP_SENSOR_COUNT > 0, + "CONFIG_PLATFORM_EC_DPTF enabled, but no temp sensors"); static void dptf_init(void) { diff --git a/zephyr/projects/nissa/prj_nivviks.conf b/zephyr/projects/nissa/prj_nivviks.conf index ae5740d59f..de422f3bb2 100644 --- a/zephyr/projects/nissa/prj_nivviks.conf +++ b/zephyr/projects/nissa/prj_nivviks.conf @@ -37,6 +37,7 @@ CONFIG_PLATFORM_EC_HOSTCMD=y # Temperature sensors CONFIG_PLATFORM_EC_TEMP_SENSOR=y +CONFIG_PLATFORM_EC_DPTF=n # Miscellaneous configs CONFIG_PLATFORM_EC_HIBERNATE_PSL=y |