diff options
-rw-r--r-- | board/coral/board.c | 43 | ||||
-rw-r--r-- | board/elm/board.c | 28 | ||||
-rw-r--r-- | board/eve/board.c | 81 | ||||
-rw-r--r-- | board/glados/board.c | 52 | ||||
-rw-r--r-- | board/grunt/board.c | 48 | ||||
-rw-r--r-- | board/kahlee/board.c | 14 | ||||
-rw-r--r-- | board/kevin/board.c | 77 | ||||
-rw-r--r-- | board/mchpevb1/board.c | 18 | ||||
-rw-r--r-- | board/nami/board.c | 63 | ||||
-rw-r--r-- | board/nautilus/board.c | 45 | ||||
-rw-r--r-- | board/nucleo-f411re/board.c | 32 | ||||
-rw-r--r-- | board/oak/board.c | 51 | ||||
-rw-r--r-- | board/poppy/board.c | 75 | ||||
-rw-r--r-- | board/rainier/board.c | 52 | ||||
-rw-r--r-- | board/reef/board.c | 89 | ||||
-rw-r--r-- | board/rowan/board.c | 37 | ||||
-rw-r--r-- | board/samus/board.c | 40 | ||||
-rw-r--r-- | board/scarlet/board.c | 37 | ||||
-rw-r--r-- | board/strago/board.c | 30 | ||||
-rw-r--r-- | board/wheatley/board.c | 51 | ||||
-rw-r--r-- | board/zoombini/board.c | 7 |
21 files changed, 2 insertions, 968 deletions
diff --git a/board/coral/board.c b/board/coral/board.c index 4ba754721b..92160d4cc6 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -812,24 +812,13 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 2, /* g, enough for laptop. */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, }, /* Sensor on for lid angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -848,11 +837,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .default_range = 2, /* g, enough for laptop. */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -863,11 +847,6 @@ struct motion_sensor_t motion_sensors[] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -884,28 +863,6 @@ struct motion_sensor_t motion_sensors[] = { .addr = BMI160_ADDR0, .default_range = 1000, /* dps */ .rot_standard_ref = &base_standard_ref, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/elm/board.c b/board/elm/board.c index 701f61ac6c..0e08f0d6da 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -469,25 +469,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, @@ -505,25 +491,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, }; diff --git a/board/eve/board.c b/board/eve/board.c index 0f0fabce6b..820fac31fe 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -790,7 +790,6 @@ const matrix_3x3_t lid_standard_ref = { }; struct motion_sensor_t motion_sensors[] = { - [LID_ACCEL] = { .name = "Lid Accel", .active_mask = SENSOR_ACTIVE_S0_S3, @@ -807,27 +806,16 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, }, /* Sensor on for lid angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, - }, + }, [BASE_ACCEL] = { .name = "Base Accel", @@ -845,11 +833,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = TAP_ODR, @@ -860,7 +843,7 @@ struct motion_sensor_t motion_sensors[] = { .odr = TAP_ODR, .ec_rate = 100 * MSEC, }, - /* Sensor off in S5 */ + /* Sensor on in S5 for battery detection */ [SENSOR_CONFIG_EC_S5] = { .odr = TAP_ODR, .ec_rate = 100 * MSEC, @@ -883,28 +866,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = NULL, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [BASE_MAG] = { @@ -922,28 +883,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [LID_LIGHT] = { @@ -962,25 +901,9 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = SI114X_LIGHT_MIN_FREQ, .max_frequency = SI114X_LIGHT_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* Run ALS sensor in S0 */ [SENSOR_CONFIG_EC_S0] = { .odr = 1000, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, diff --git a/board/glados/board.c b/board/glados/board.c index 1914a615ab..e1a5c566fc 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -459,26 +459,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -496,28 +481,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = NULL, /* Identity Matrix. */ .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, {.name = "Lid Accel", @@ -535,25 +498,10 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, - }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, }; diff --git a/board/grunt/board.c b/board/grunt/board.c index 1257a74a88..f7039c5a6a 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -550,25 +550,9 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC use accel for angle detection */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - /* Sensor off in S5. */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -589,11 +573,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -602,12 +581,6 @@ struct motion_sensor_t motion_sensors[] = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -627,27 +600,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; diff --git a/board/kahlee/board.c b/board/kahlee/board.c index 97a6ae40ce..38793783d0 100644 --- a/board/kahlee/board.c +++ b/board/kahlee/board.c @@ -523,23 +523,9 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* Setup for AP for rotation detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, diff --git a/board/kevin/board.c b/board/kevin/board.c index c7b0442c65..d2fd228723 100644 --- a/board/kevin/board.c +++ b/board/kevin/board.c @@ -483,11 +483,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -496,12 +491,6 @@ struct motion_sensor_t motion_sensors[] = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 }, }, }, @@ -524,28 +513,6 @@ struct motion_sensor_t motion_sensors[] = { #endif .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, #ifdef BOARD_KEVIN [LID_ACCEL] = { @@ -564,24 +531,13 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMA255_ACCEL_MIN_FREQ, .max_frequency = BMA255_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -602,24 +558,13 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -636,28 +581,6 @@ struct motion_sensor_t motion_sensors[] = { .default_range = 1 << 18, /* 1bit = 4 Pa, 16bit ~= 2600 hPa */ .min_frequency = BMP280_BARO_MIN_FREQ, .max_frequency = BMP280_BARO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, #endif /* BOARD_KEVIN */ }; diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c index 59d33572d3..c6afeb0db2 100644 --- a/board/mchpevb1/board.c +++ b/board/mchpevb1/board.c @@ -946,8 +946,6 @@ struct motion_sensor_t motion_sensors[] = { .config = { /* AP: by default use EC settings */ [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -956,13 +954,9 @@ struct motion_sensor_t motion_sensors[] = { }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 }, }, }, @@ -984,23 +978,15 @@ struct motion_sensor_t motion_sensors[] = { .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, }, /* EC does not need in S0 */ [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -1032,12 +1018,8 @@ struct motion_sensor_t motion_sensors[] = { }, /* unused */ [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, }, [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, diff --git a/board/nami/board.c b/board/nami/board.c index 6136279665..dd9fa16cee 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -588,11 +588,6 @@ struct motion_sensor_t motion_sensors[] = { .max_frequency = BMA255_ACCEL_MAX_FREQ, .default_range = 2, /* g, to support tablet mode */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -603,11 +598,6 @@ struct motion_sensor_t motion_sensors[] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 0, }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, [BASE_ACCEL] = { @@ -626,11 +616,6 @@ struct motion_sensor_t motion_sensors[] = { .max_frequency = BMI160_ACCEL_MAX_FREQ, .default_range = 2, /* g, to support tablet mode */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -641,11 +626,6 @@ struct motion_sensor_t motion_sensors[] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 0, }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, [BASE_GYRO] = { @@ -663,28 +643,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [LID_ALS] = { .name = "Light", @@ -700,27 +658,6 @@ struct motion_sensor_t motion_sensors[] = { .default_range = 0x10000, /* scale = 1; uscale = 0 */ .min_frequency = OPT3001_LIGHT_MIN_FREQ, .max_frequency = OPT3001_LIGHT_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S0] = { - .odr = 1000, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/nautilus/board.c b/board/nautilus/board.c index 4fa24a8382..654b8e50d2 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -608,25 +608,13 @@ struct motion_sensor_t motion_sensors[] = { .max_frequency = BMA255_ACCEL_MAX_FREQ, .default_range = 2, /* g, to support tablet mode */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, }, /* Sensor on in S3 */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -646,11 +634,6 @@ struct motion_sensor_t motion_sensors[] = { .max_frequency = BMI160_ACCEL_MAX_FREQ, .default_range = 2, /* g, to support tablet mode */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -659,12 +642,6 @@ struct motion_sensor_t motion_sensors[] = { /* Sensor on in S3 */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 }, }, }, @@ -683,28 +660,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/nucleo-f411re/board.c b/board/nucleo-f411re/board.c index 237f896c8b..0f7c57f1e3 100644 --- a/board/nucleo-f411re/board.c +++ b/board/nucleo-f411re/board.c @@ -79,11 +79,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = NULL, .default_range = 2, /* g, enough for laptop. */ .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -94,11 +89,6 @@ struct motion_sensor_t motion_sensors[] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -115,28 +105,6 @@ struct motion_sensor_t motion_sensors[] = { .addr = BMI160_ADDR0, .default_range = 1000, /* dps */ .rot_standard_ref = NULL, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/oak/board.c b/board/oak/board.c index 5d50a0be0b..d949194907 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -638,26 +638,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -675,28 +660,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, #endif #ifdef CONFIG_ACCEL_KX022 @@ -715,25 +678,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, #endif diff --git a/board/poppy/board.c b/board/poppy/board.c index d5d9a6dac0..2f9cc31c4f 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -774,26 +774,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -812,28 +797,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &lid_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [LID_MAG] = { @@ -851,28 +814,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &mag_standard_ref, .min_frequency = BMM150_MAG_MIN_FREQ, .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL), - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [LID_ALS] = { .name = "Light", @@ -889,24 +830,8 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = OPT3001_LIGHT_MIN_FREQ, .max_frequency = OPT3001_LIGHT_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, [SENSOR_CONFIG_EC_S0] = { .odr = 1000, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, diff --git a/board/rainier/board.c b/board/rainier/board.c index e56cab47d0..c173b2f427 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -381,26 +381,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* Enable accel in S0 */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, [LID_GYRO] = { @@ -419,26 +404,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* Enable gyro in S0 */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, [LID_BARO] = { @@ -454,28 +424,6 @@ struct motion_sensor_t motion_sensors[] = { .default_range = 1 << 18, /* 1bit = 4 Pa, 16bit ~= 2600 hPa */ .min_frequency = BMP280_BARO_MIN_FREQ, .max_frequency = BMP280_BARO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/reef/board.c b/board/reef/board.c index e15b9a35aa..3f0321ac15 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -806,24 +806,13 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, }, /* Sensor on for lid angle detection */ [SENSOR_CONFIG_EC_S3] = { .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -844,11 +833,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, @@ -859,11 +843,6 @@ struct motion_sensor_t motion_sensors[] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -882,28 +861,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [BASE_MAG] = { @@ -924,23 +881,15 @@ struct motion_sensor_t motion_sensors[] = { .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, }, /* EC does not need in S0 */ [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, @@ -958,28 +907,6 @@ struct motion_sensor_t motion_sensors[] = { .default_range = 1 << 18, /* 1bit = 4 Pa, 16bit ~= 2600 hPa */ .min_frequency = BMP280_BARO_MIN_FREQ, .max_frequency = BMP280_BARO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [LID_ALS] = { .name = "Light", @@ -996,24 +923,8 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = OPT3001_LIGHT_MIN_FREQ, .max_frequency = OPT3001_LIGHT_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, [SENSOR_CONFIG_EC_S0] = { .odr = 1000, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, diff --git a/board/rowan/board.c b/board/rowan/board.c index d8150d8b23..2a0c7b4f0f 100644 --- a/board/rowan/board.c +++ b/board/rowan/board.c @@ -471,26 +471,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* Sensor on in S0 for Chrome screen orientation */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -508,28 +493,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &lid_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S0 by default */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/samus/board.c b/board/samus/board.c index 167b20093c..c26f08137d 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -330,11 +330,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = LSM6DS0_ACCEL_MIN_FREQ, .max_frequency = LSM6DS0_ACCEL_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 119000 | ROUND_UP_FLAG, @@ -367,25 +362,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 100000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, @@ -403,27 +384,6 @@ struct motion_sensor_t motion_sensors[] = { .default_range = 2000, /* g, enough for laptop. */ .min_frequency = LSM6DS0_GYRO_MIN_FREQ, .max_frequency = LSM6DS0_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC use accel for angle detection */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 119000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - } }, }; diff --git a/board/scarlet/board.c b/board/scarlet/board.c index 5d3dc341ec..797d828e83 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -391,26 +391,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: by default use EC settings */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* Enable accel in S0 */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, [LID_GYRO] = { @@ -428,28 +413,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* Enable gyro in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 100 * MSEC, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, [VSYNC] = { .name = "Camera vsync", diff --git a/board/strago/board.c b/board/strago/board.c index 38ad6f8292..05bd7fda17 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -211,26 +211,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 100000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, } }, {.name = "Lid Accel", @@ -248,26 +233,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 100000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, }; diff --git a/board/wheatley/board.c b/board/wheatley/board.c index f67e56f45f..8693423018 100644 --- a/board/wheatley/board.c +++ b/board/wheatley/board.c @@ -469,25 +469,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { - /* AP: suspended until AP asks for data. */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100 * MSEC, }, - /* unused */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, }, }, @@ -507,26 +493,11 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { - /* AP: suspended until AP asks for data. */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, .ec_rate = 100, }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0 - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0 - }, }, }, @@ -545,28 +516,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = NULL, /* Identity Matrix. */ .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* EC does not need in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/zoombini/board.c b/board/zoombini/board.c index df89ca2d94..80d1c09da5 100644 --- a/board/zoombini/board.c +++ b/board/zoombini/board.c @@ -218,23 +218,16 @@ struct motion_sensor_t motion_sensors[] = { .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, }, /* Run ALS sensor in S0 */ [SENSOR_CONFIG_EC_S0] = { .odr = 1000, - .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, }, }, }, |