summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-03-19 14:37:25 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-03-21 03:25:36 +0000
commit8a185e74f05b2be906fa9db40d77b66f5592b6b4 (patch)
tree63d5a5be5b9163fdb4a8e05e752ff8889f9220fb
parentb5d23d2a9cf1a5174ff9b3f606fafaf969296ce8 (diff)
downloadchrome-ec-8a185e74f05b2be906fa9db40d77b66f5592b6b4.tar.gz
board: In motion sensor array, remove more assignment to 0
BUG=none TEST=Compile BRANCH=none Change-Id: I86ccc26d7fb6d482dca3275a4365729ff8644777 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/972202 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--board/mchpevb1/board.c34
-rw-r--r--board/reef/board.c16
-rw-r--r--board/scarlet/board.c23
-rw-r--r--board/zoombini/board.c11
4 files changed, 0 insertions, 84 deletions
diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c
index c6afeb0db2..eeeb557b96 100644
--- a/board/mchpevb1/board.c
+++ b/board/mchpevb1/board.c
@@ -944,20 +944,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] = {
- },
/* 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] = {
- },
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S5] = {
- },
},
},
@@ -975,20 +966,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] = {
- },
- /* EC does not need in S0 */
- [SENSOR_CONFIG_EC_S0] = {
- },
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S3] = {
- },
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S5] = {
- },
- },
},
#ifdef CONFIG_ACCEL_KX022
{.name = "Lid Accel",
@@ -1006,22 +983,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] = {
- },
- [SENSOR_CONFIG_EC_S5] = {
- },
- },
},
#endif /* #ifdef CONFIG_ACCEL_KX022 */
};
diff --git a/board/reef/board.c b/board/reef/board.c
index 3f0321ac15..9bdc35a9a2 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -862,7 +862,6 @@ struct motion_sensor_t motion_sensors[] = {
.min_frequency = BMI160_GYRO_MIN_FREQ,
.max_frequency = BMI160_GYRO_MAX_FREQ,
},
-
[BASE_MAG] = {
.name = "Base Mag",
.active_mask = SENSOR_ACTIVE_S0,
@@ -878,22 +877,7 @@ 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] = {
- },
- /* EC does not need in S0 */
- [SENSOR_CONFIG_EC_S0] = {
- },
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S3] = {
- },
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S5] = {
- },
- },
},
-
[BASE_BARO] = {
.name = "Base Baro",
.active_mask = SENSOR_ACTIVE_S0,
diff --git a/board/scarlet/board.c b/board/scarlet/board.c
index 8b0dc686bd..21b2424ea1 100644
--- a/board/scarlet/board.c
+++ b/board/scarlet/board.c
@@ -427,29 +427,6 @@ struct motion_sensor_t motion_sensors[] = {
.default_range = 0,
.min_frequency = 0,
.max_frequency = 1,
- .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 80d1c09da5..35404b2355 100644
--- a/board/zoombini/board.c
+++ b/board/zoombini/board.c
@@ -216,20 +216,9 @@ 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] = {
- },
- /* Run ALS sensor in S0 */
[SENSOR_CONFIG_EC_S0] = {
.odr = 1000,
},
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S3] = {
- },
- /* Sensor off in S3/S5 */
- [SENSOR_CONFIG_EC_S5] = {
- },
- },
},
};
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);