summaryrefslogtreecommitdiff
path: root/board/snappy/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/snappy/board.c')
-rw-r--r--board/snappy/board.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/board/snappy/board.c b/board/snappy/board.c
index 1d4ae01583..872c886f73 100644
--- a/board/snappy/board.c
+++ b/board/snappy/board.c
@@ -522,6 +522,14 @@ static void board_init(void)
/* Enable Gyro interrupts */
gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L);
+
+ /* Set the sensors in the right powermode */
+ if (system_get_board_version() <= BOARD_VERSION_3) {
+ int i;
+
+ for (i = BASE_ACCEL; i <= BASE_MAG; ++i)
+ motion_sensors[i].active_mask = SENSOR_ACTIVE_S0;
+ }
}
/* PP3300 needs to be enabled before TCPC init hooks */
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_FIRST);
@@ -887,7 +895,7 @@ struct motion_sensor_t motion_sensors[] = {
[BASE_GYRO] = {
.name = "Base Gyro",
- .active_mask = SENSOR_ACTIVE_S0,
+ .active_mask = SENSOR_ACTIVE_S0_S3,
.chip = MOTIONSENSE_CHIP_BMI160,
.type = MOTIONSENSE_TYPE_GYRO,
.location = MOTIONSENSE_LOC_BASE,
@@ -924,7 +932,7 @@ struct motion_sensor_t motion_sensors[] = {
[BASE_MAG] = {
.name = "Base Mag",
- .active_mask = SENSOR_ACTIVE_S0,
+ .active_mask = SENSOR_ACTIVE_S0_S3,
.chip = MOTIONSENSE_CHIP_BMI160,
.type = MOTIONSENSE_TYPE_MAG,
.location = MOTIONSENSE_LOC_BASE,