From f7720d580d007b3f3204fac97e39058c0c635687 Mon Sep 17 00:00:00 2001 From: Alexandru M Stan Date: Wed, 18 Jan 2017 13:04:47 -0800 Subject: eve: Add BMI160 as a temperature sensor. Enable reading temperature from BMI160. BUG=chrome-os-partner:58894 BRANCH=master TEST=EC Console: > temps Battery : Error 1 Ambient : 304 K = 31 C Charger : 303 K = 30 C DRAM : 305 K = 32 C eMMC : 307 K = 34 C Gyro : 308 K = 35 C Unknown error TEST=AP Console: localhost ~ # ectool tempsinfo 5 Sensor name: Gyro Sensor type: 1 localhost ~ # ectool temps 5 Reading temperature...308 Change-Id: I2e943ec664745fec5923df67515b96ba569e05ad Signed-off-by: Gwendal Grignou Signed-off-by: Alexandru M Stan Reviewed-on: https://chromium-review.googlesource.com/430210 Commit-Ready: Alexandru Stan Tested-by: Alexandru Stan --- board/eve/board.c | 1 + board/eve/board.h | 1 + 2 files changed, 2 insertions(+) diff --git a/board/eve/board.c b/board/eve/board.c index c8d76d0a3d..acce082513 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -264,6 +264,7 @@ const struct temp_sensor_t temp_sensors[] = { BD99992GW_ADC_CHANNEL_SYSTHERM2, 4}, {"eMMC", TEMP_SENSOR_TYPE_BOARD, bd99992gw_get_val, BD99992GW_ADC_CHANNEL_SYSTHERM3, 4}, + {"Gyro", TEMP_SENSOR_TYPE_BOARD, bmi160_get_sensor_temp, BASE_GYRO, 1}, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); diff --git a/board/eve/board.h b/board/eve/board.h index 5e6e57a546..02e977b654 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -192,6 +192,7 @@ enum temp_sensor_id { TEMP_SENSOR_CHARGER, /* BD99992GW SYSTHERM1 */ TEMP_SENSOR_DRAM, /* BD99992GW SYSTHERM2 */ TEMP_SENSOR_EMMC, /* BD99992GW SYSTHERM3 */ + TEMP_SENSOR_GYRO, TEMP_SENSOR_COUNT }; -- cgit v1.2.1