diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2018-03-12 13:52:48 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-14 07:04:02 -0700 |
commit | abde1bca995f018f4c1df8dc24a0a33c18557871 (patch) | |
tree | 19310b6df4beda45a457946f235e305424aab9a5 /board/eve | |
parent | ccea4b67f2e36a505ddf546bde284f75d728add0 (diff) | |
download | chrome-ec-abde1bca995f018f4c1df8dc24a0a33c18557871.tar.gz |
board: In motion sensor array, remove assignment to 0
Assignment to 0 are no necessary.
BUG=none
TEST=compile, check nami.
BRANCH=none
Change-Id: I1bc11efcff31cbfe2947580e7b8db0d5ba72d444
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/959502
Diffstat (limited to 'board/eve')
-rw-r--r-- | board/eve/board.c | 81 |
1 files changed, 2 insertions, 79 deletions
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, }, }, }, |