diff options
author | Simon Glass <sjg@chromium.org> | 2018-01-11 17:23:41 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-12 14:31:13 -0800 |
commit | 9802a28f19df1e0e948d085b6bdfe99f2698eda6 (patch) | |
tree | 3c74cc23e768fd9b1e5a85aa00e3f892833571b1 /board/grunt/board.c | |
parent | cb8c63280139ec5990cd57668e81151e4b66856b (diff) | |
download | chrome-ec-9802a28f19df1e0e948d085b6bdfe99f2698eda6.tar.gz |
grunt: Enable the CPU temperature sensor
Set this up so we can measure the CPU temperature.
BUG=b:71868256
BRANCH=none
TEST=on EC:
> temps
Charger : 312 K = 39 C
SOC : 321 K = 48 C
CPU : 331 K = 58 C
CPU shows 58 C (which seems a lot cooler than it actually is)
Change-Id: Ia625e36b95a566aa436eff751c2ebf5863d984ad
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/862885
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'board/grunt/board.c')
-rw-r--r-- | board/grunt/board.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c index 8f03880128..92b1a69eb5 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -20,6 +20,7 @@ #include "driver/ppc/sn5s330.h" #include "driver/tcpm/anx74xx.h" #include "driver/tcpm/ps8xxx.h" +#include "driver/temp_sensor/sb_tsi.h" #include "ec_commands.h" #include "extpower.h" #include "gpio.h" @@ -415,6 +416,7 @@ static int board_get_temp(int idx, int *temp_k) const struct temp_sensor_t temp_sensors[] = { {"Charger", TEMP_SENSOR_TYPE_BOARD, board_get_temp, 0, 1}, {"SOC", TEMP_SENSOR_TYPE_BOARD, board_get_temp, 1, 5}, + {"CPU", TEMP_SENSOR_TYPE_CPU, sb_tsi_get_val, 0, 4}, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); |