strago: Added temperature reading for battery.

BUG=none
TEST=Verified `temps` prints the battery temperature.
BRANCH=none

Change-Id: Ied6eb5c6c01f7bd4b5f397cb59e165fc7bd7024f
Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/265900
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Kevin K Wong
2015-03-31 10:42:36 -07:00
committed by ChromeOS Commit Bot
parent 4fce69d394
commit a5b3bb0f97
2 changed files with 7 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
/* Strago board-specific configuration */
#include "charger.h"
#include "charge_state.h"
#include "driver/accel_kxcj9.h"
#include "driver/temp_sensor/tmp432.h"
#include "extpower.h"
@@ -58,6 +59,8 @@ const struct temp_sensor_t temp_sensors[] = {
TMP432_IDX_REMOTE1, 4},
{"TMP432_Sensor_2", TEMP_SENSOR_TYPE_BOARD, tmp432_get_val,
TMP432_IDX_REMOTE2, 4},
{"Battery", TEMP_SENSOR_TYPE_BATTERY, charge_temp_sensor_get_val,
0, 4},
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
@@ -68,6 +71,7 @@ struct ec_thermal_config thermal_params[] = {
{{0, 0, 0}, 0, 0}, /* TMP432_Internal */
{{0, 0, 0}, 0, 0}, /* TMP432_Sensor_1 */
{{0, 0, 0}, 0, 0}, /* TMP432_Sensor_2 */
{{0, 0, 0}, 0, 0}, /* Battery Sensor */
};
BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT);

View File

@@ -93,6 +93,9 @@ enum temp_sensor_id {
TEMP_SENSOR_I2C_TMP432_REMOTE1,
TEMP_SENSOR_I2C_TMP432_REMOTE2,
/* Battery temperature sensor */
TEMP_SENSOR_BATTERY,
TEMP_SENSOR_COUNT
};