diff options
author | Diana Z <dzigterman@chromium.org> | 2021-06-03 16:46:23 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-07 23:41:28 +0000 |
commit | a08f3dfebadcf8e8eb6f17abb7644ebc527f987b (patch) | |
tree | 205572a4786e75da016ac5bb04ae5a7d5e05d17e /baseboard/guybrush/baseboard.c | |
parent | f83aa8e75eba5a7a71f32a9ef0c7c25bb6efcae9 (diff) | |
download | chrome-ec-a08f3dfebadcf8e8eb6f17abb7644ebc527f987b.tar.gz |
Guybrush: Add ambient temperature sensor
Add the ambient temperature sensor which is being placed on the board in
version 2. Note this will return an error on version 1 boards.
BRANCH=None
BUG=b:188539950
TEST=make -j buildall; load on version 1 and observe temps reports 0
for ambient temperature and nothing is spewing errors
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I5c1abffc716c758334cb923c0a34a7ec467ff565
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2938046
Reviewed-by: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'baseboard/guybrush/baseboard.c')
-rw-r--r-- | baseboard/guybrush/baseboard.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c index aa3a548142..69e454eef9 100644 --- a/baseboard/guybrush/baseboard.c +++ b/baseboard/guybrush/baseboard.c @@ -222,6 +222,12 @@ const struct temp_sensor_t temp_sensors[] = { .read = sb_tsi_get_val, .idx = 0, }, + [TEMP_SENSOR_AMBIENT] = { + .name = "Ambient", + .type = TEMP_SENSOR_TYPE_BOARD, + .read = tmp112_get_val, + .idx = TMP112_AMB, + }, }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); @@ -271,6 +277,10 @@ struct ec_thermal_config thermal_params[TEMP_SENSOR_COUNT] = { .temp_fan_off = 0, .temp_fan_max = 0, }, + /* + * Note: Leave ambient entries at 0, both as it does not represent a + * hotspot and as not all boards have this sensor + */ }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); |