diff options
author | Alexandru M Stan <amstan@chromium.org> | 2017-01-18 13:04:47 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-18 19:18:25 -0800 |
commit | f7720d580d007b3f3204fac97e39058c0c635687 (patch) | |
tree | 714d98719897bee325dd5aae6cad66ef95aa159e | |
parent | 48e8e3faf082c18000bccd9c2af683a9d7600e7f (diff) | |
download | chrome-ec-f7720d580d007b3f3204fac97e39058c0c635687.tar.gz |
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 <gwendal@chromium.org>
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/430210
Commit-Ready: Alexandru Stan <amstan@chromium.org>
Tested-by: Alexandru Stan <amstan@chromium.org>
-rw-r--r-- | board/eve/board.c | 1 | ||||
-rw-r--r-- | board/eve/board.h | 1 |
2 files changed, 2 insertions, 0 deletions
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 }; |