diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-12-08 02:02:00 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-24 07:13:20 +0000 |
commit | 144d6304791ee38f082ae317d121e1a3e69197da (patch) | |
tree | d665471d200da753450db66c2f75fb4fa224fb2e | |
parent | e6dde3dfd93b326fa1eef39031a49e267a1c23cc (diff) | |
download | chrome-ec-144d6304791ee38f082ae317d121e1a3e69197da.tar.gz |
board: Set Accelerometer range to 4g
Required by Android CDD - Section 7.3.1 - Paragraph C.1.4
Modified mechanically with:
for i in $(grep -lr "\.default_range" board); do
sed -i '/.default_range =/s#\(.*\.default_range = \).* /\
\* g.*#\14, /* g, to meet CDD 7.3.1/C-1-4 reqs */#' $i
done
Manually reworked to only change the accelerometer that matters to
android:
The lid accelerometer or the base accelerometer if the base also hosts
the gyroscope.
This is only for future EC, no need to land the change on branches:
mems_setup will take care to set accelerometer ranges at 4g on startup.
Conflicts:
board/akemi/board.c
board/ampton/board.c
board/arcada_ish/board.c
board/bloog/board.c
board/bobba/board.c
board/cheza/board.c
board/coral/board.c
board/dood/board.c
board/drallion_ish/board.c
board/dratini/board.c
board/elm/board.c
board/flapjack/board.c
board/fleex/board.c
board/garg/board.c
board/glados/board.c
board/hatch/board.c
board/helios/board.c
board/jinlon/board.c
board/kindred/board.c
board/kodama/board.c
board/kohaku/board.c
board/kukui/board.c
board/mchpevb1/board.c
board/meep/board.c
board/nami/board.c
board/nocturne/board.c
board/nucleo-f411re/board.c
board/oak/board.c
board/phaser/board.c
board/rammus/board.c
board/reef_mchp/board.c
board/strago/board.c
board/stryke/board.c
board/tglrvp_ish/board.c
board/treeya/board.c
board/trogdor/board.c
board/yorp/board.c
BUG=b:144004449
BRANCH=none
TEST=compile
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957375
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
(cherry picked from commit 992810a77dd3698e69bcedd84f8259a08a753cb9)
Change-Id: If8c14b2e928c9c70c0ce51451adcfcd674a9e73b
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2249460
-rw-r--r-- | board/coral/board.c | 2 | ||||
-rw-r--r-- | board/elm/board.c | 2 | ||||
-rw-r--r-- | board/eve/board.c | 4 | ||||
-rw-r--r-- | board/glados/board.c | 2 | ||||
-rw-r--r-- | board/mchpevb1/board.c | 2 | ||||
-rw-r--r-- | board/nami/board.c | 4 | ||||
-rw-r--r-- | board/nautilus/board.c | 4 | ||||
-rw-r--r-- | board/nucleo-f411re/board.c | 2 | ||||
-rw-r--r-- | board/oak/board.c | 2 | ||||
-rw-r--r-- | board/poppy/board.c | 2 | ||||
-rw-r--r-- | board/rainier/board.c | 2 | ||||
-rw-r--r-- | board/reef/board.c | 4 | ||||
-rw-r--r-- | board/samus/board.c | 6 | ||||
-rw-r--r-- | board/scarlet/board.c | 2 | ||||
-rw-r--r-- | board/strago/board.c | 2 |
15 files changed, 21 insertions, 21 deletions
diff --git a/board/coral/board.c b/board/coral/board.c index e54138b904..7be09532af 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -836,7 +836,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .addr = BMI160_ADDR0, .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/elm/board.c b/board/elm/board.c index 0e08f0d6da..ef30344286 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -487,7 +487,7 @@ struct motion_sensor_t motion_sensors[] = { .drv_data = &g_kx022_data[1], .addr = 3, /* SPI, device ID 1 */ .rot_standard_ref = &lid_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, enough for laptop. */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { diff --git a/board/eve/board.c b/board/eve/board.c index 820fac31fe..17a72ee0d1 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -802,7 +802,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_LID_ACCEL, .addr = KXCJ9_ADDR0, .rot_standard_ref = &lid_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 2, /* g, enough for lid angle calculation. */ .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { @@ -829,7 +829,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .addr = BMI160_ADDR0, .rot_standard_ref = NULL, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/glados/board.c b/board/glados/board.c index e1a5c566fc..55e2d7b8b1 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -455,7 +455,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = BMI160_ADDR0, .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c index eeeb557b96..8b9e714ede 100644 --- a/board/mchpevb1/board.c +++ b/board/mchpevb1/board.c @@ -940,7 +940,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/nami/board.c b/board/nami/board.c index 40722559cf..c950eb11b8 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -568,7 +568,7 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &lid_standard_ref, .min_frequency = BMA255_ACCEL_MIN_FREQ, .max_frequency = BMA255_ACCEL_MAX_FREQ, - .default_range = 2, /* g, to support tablet mode */ + .default_range = 2, /* g, to support lid angle calculation. */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -596,7 +596,7 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, - .default_range = 2, /* g, to support tablet mode */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/nautilus/board.c b/board/nautilus/board.c index bff3b4e1f9..848ae364d9 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -625,7 +625,7 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &lid_standard_ref, .min_frequency = BMA255_ACCEL_MIN_FREQ, .max_frequency = BMA255_ACCEL_MAX_FREQ, - .default_range = 2, /* g, to support tablet mode */ + .default_range = 2, /* g, to support lid angle calculation. */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -651,7 +651,7 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, - .default_range = 2, /* g, to support tablet mode */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/nucleo-f411re/board.c b/board/nucleo-f411re/board.c index 0f7c57f1e3..6a40ed6bc4 100644 --- a/board/nucleo-f411re/board.c +++ b/board/nucleo-f411re/board.c @@ -77,7 +77,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = BMI160_ADDR0, .rot_standard_ref = NULL, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/oak/board.c b/board/oak/board.c index d949194907..6e67d7dce6 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -634,7 +634,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = 1, .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/poppy/board.c b/board/poppy/board.c index a40099e6f2..cceff650b1 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -742,7 +742,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .addr = BMI160_ADDR0, .rot_standard_ref = &lid_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/rainier/board.c b/board/rainier/board.c index c173b2f427..6b6365cbaf 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -377,7 +377,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/reef/board.c b/board/reef/board.c index 2bbccc946b..a70a40bf54 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -803,7 +803,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_LID_ACCEL, .addr = KX022_ADDR1, .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 2, /* g, enough for laptop. */ + .default_range = 2, /* g, to support lid angle calculation. */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -830,7 +830,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .addr = BMI160_ADDR0, .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/samus/board.c b/board/samus/board.c index c26f08137d..de6a0ef715 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -326,7 +326,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = LSM6DS0_ADDR1, .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DS0_ACCEL_MIN_FREQ, .max_frequency = LSM6DS0_ACCEL_MAX_FREQ, .config = { @@ -358,7 +358,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = KXCJ9_ADDR0, .rot_standard_ref = &lid_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 2, /* g, to support lid angle calculation. */ .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { @@ -381,7 +381,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = LSM6DS0_ADDR1, .rot_standard_ref = NULL, - .default_range = 2000, /* g, enough for laptop. */ + .default_range = 2000, /* dps, enough for laptop. */ .min_frequency = LSM6DS0_GYRO_MIN_FREQ, .max_frequency = LSM6DS0_GYRO_MAX_FREQ, }, diff --git a/board/scarlet/board.c b/board/scarlet/board.c index ed14cd0a1c..a5e34452ee 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -386,7 +386,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .rot_standard_ref = &base_standard_ref, - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = BMI160_ACCEL_MIN_FREQ, .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { diff --git a/board/strago/board.c b/board/strago/board.c index 05bd7fda17..b1856617d7 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -229,7 +229,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .addr = KXCJ9_ADDR0, .rot_standard_ref = &lid_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = KXCJ9_ACCEL_MIN_FREQ, .max_frequency = KXCJ9_ACCEL_MAX_FREQ, .config = { |