summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-08-10 10:56:54 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-10 18:33:23 -0700
commitdb69ab004a5425fd4d0ece982e62213d6f8da452 (patch)
treee57b0468139e841f68597ea733df9e739fd4203c
parent8713f42d278d05d06c6b5db6b7cfa44e769814d5 (diff)
downloadchrome-ec-db69ab004a5425fd4d0ece982e62213d6f8da452.tar.gz
nocturne: Update sensor active mask to include S3.
Previously, the active_mask member in motion_sensor_t was set to the S0 for all the sensors. Although the sensors are only used in S0, this value should reflect the actual power state of the sensor. The config members describe the power states when the EC intends to use the sensor. This combination was causing the sensors to not have their calibration data applied following a suspend/resume cycle. This commit updates the active mask to include S3 thereby keeping the calibration settings across a suspend resume cycle. BUG=b:112462750, b:111815348 BRANCH=None TEST=Flash nocturne; set calibration attributes in VPD, reboot, verify that calibration attributes are applied. Suspend/resume, verify that the calibration attributes are still applied. Change-Id: Iad632e3bb6f61b056015ca8c9d90b0f9d7c58c5e Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/1171258 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r--board/nocturne/board.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index d8e9dfb499..4b53b40b22 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -168,7 +168,7 @@ const matrix_3x3_t lid_standard_ref = {
struct motion_sensor_t motion_sensors[] = {
[LID_ACCEL] = {
.name = "BMI160 ACC",
- .active_mask = SENSOR_ACTIVE_S0,
+ .active_mask = SENSOR_ACTIVE_S0_S3,
.chip = MOTIONSENSE_CHIP_BMI160,
.type = MOTIONSENSE_TYPE_ACCEL,
.location = MOTIONSENSE_LOC_LID,
@@ -191,7 +191,7 @@ struct motion_sensor_t motion_sensors[] = {
[LID_GYRO] = {
.name = "BMI160 GYRO",
- .active_mask = SENSOR_ACTIVE_S0,
+ .active_mask = SENSOR_ACTIVE_S0_S3,
.chip = MOTIONSENSE_CHIP_BMI160,
.type = MOTIONSENSE_TYPE_GYRO,
.location = MOTIONSENSE_LOC_LID,
@@ -208,7 +208,7 @@ struct motion_sensor_t motion_sensors[] = {
[LID_ALS] = {
.name = "Light",
- .active_mask = SENSOR_ACTIVE_S0,
+ .active_mask = SENSOR_ACTIVE_S0_S3,
.chip = MOTIONSENSE_CHIP_OPT3001,
.type = MOTIONSENSE_TYPE_LIGHT,
.location = MOTIONSENSE_LOC_LID,