summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2015-06-22 15:30:21 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-23 03:26:45 +0000
commit73ce22ffa522cf3ba75c198410a9597a7570ae6c (patch)
tree111f3ddff5ca2f40b04ba4c73d96666ed0436b8f
parent19424a6c91b19488d04b75491599f4ae719d944d (diff)
downloadchrome-ec-73ce22ffa522cf3ba75c198410a9597a7570ae6c.tar.gz
samus: Add battery temp to temp_sensors list.
BUG=chrome-os-partner:15461 BUG=chrome-os-partner:40599 BRANCH=none TEST=Flash EC image onto samus and verify that "temps" EC console command displays the battery temperature. TEST=Boot samus and verify that "ectool temps all" from developer console shows the battery temperature. TEST=make -j buildall tests Change-Id: I7db5981f876745a5d8711fd54cc02d77862417db Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/281026 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/samus/board.c3
-rw-r--r--board/samus/board.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/board/samus/board.c b/board/samus/board.c
index 2272f1acfe..b6f5c1453c 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -11,6 +11,7 @@
#include "battery.h"
#include "capsense.h"
#include "charger.h"
+#include "charge_state.h"
#include "common.h"
#include "console.h"
#include "driver/accel_kxcj9.h"
@@ -161,6 +162,7 @@ const struct temp_sensor_t temp_sensors[] = {
{"I2C-Right D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 9, 7},
{"I2C-Left D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 10, 7},
{"I2C-Left D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 11, 7},
+ {"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_temp_sensor_get_val, 0, 4},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
@@ -191,6 +193,7 @@ struct ec_thermal_config thermal_params[] = {
{{0, 0, 0}, 0, 0},
{{0, 0, 0}, C_TO_K(43), C_TO_K(54)}, /* Left D die */
{{0, 0, 0}, 0, 0},
+ {{0, 0, 0}, 0, 0}, /* Battery */
};
BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);
diff --git a/board/samus/board.h b/board/samus/board.h
index c68ac4dcb4..2f8576a1d2 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -163,6 +163,9 @@ enum temp_sensor_id {
TEMP_SENSOR_I2C_U116_DIE,
TEMP_SENSOR_I2C_U116_OBJECT,
+ /* Battery temperature sensor */
+ TEMP_SENSOR_BATTERY,
+
TEMP_SENSOR_COUNT
};