diff options
44 files changed, 76 insertions, 72 deletions
diff --git a/board/akemi/board.c b/board/akemi/board.c index da7af272ad..a9ce4d2c4b 100644 --- a/board/akemi/board.c +++ b/board/akemi/board.c @@ -200,7 +200,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LIS2DWL_ADDR1_FLAGS, .rot_standard_ref = &lid_standard_ref, - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = LIS2DW12_ODR_MIN_VAL, .max_frequency = LIS2DW12_ODR_MAX_VAL, .config = { @@ -230,7 +230,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .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 = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/ampton/board.c b/board/ampton/board.c index 588a1d5e58..9dfa1e1db8 100644 --- a/board/ampton/board.c +++ b/board/ampton/board.c @@ -190,7 +190,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = &lid_standard_ref, - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -216,7 +216,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/arcada_ish/board.c b/board/arcada_ish/board.c index ea8118642e..624a376dca 100644 --- a/board/arcada_ish/board.c +++ b/board/arcada_ish/board.c @@ -65,7 +65,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR1_FLAGS, .rot_standard_ref = &lid_rot_ref, - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { @@ -112,8 +112,12 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LNG2DM_ADDR0_FLAGS, .rot_standard_ref = NULL, /* Identity matrix */ - /* We only use 2g because its resolution is only 8-bits */ - .default_range = 2, /* g */ + /* + * We only use 2g because its resolution is only 8-bits. + * Beside, it is only used for lid angle calculation, where + * measure over 1.5g are dropped. + */ + .default_range = 2, /* g */ .min_frequency = LIS2DH_ODR_MIN_VAL, .max_frequency = LIS2DH_ODR_MAX_VAL, .config = { diff --git a/board/bloog/board.c b/board/bloog/board.c index d68f3b54d5..4a5f9bb858 100644 --- a/board/bloog/board.c +++ b/board/bloog/board.c @@ -170,7 +170,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/bobba/board.c b/board/bobba/board.c index d437e167d3..c971b61241 100644 --- a/board/bobba/board.c +++ b/board/bobba/board.c @@ -170,7 +170,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -196,7 +196,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/cheza/board.c b/board/cheza/board.c index 8fb927d436..1742b9d4a2 100644 --- a/board/cheza/board.c +++ b/board/cheza/board.c @@ -651,7 +651,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/coral/board.c b/board/coral/board.c index 1263ada209..04cb86ec33 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -752,7 +752,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/dood/board.c b/board/dood/board.c index 5c64fc60b5..de51648b88 100644 --- a/board/dood/board.c +++ b/board/dood/board.c @@ -153,7 +153,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -179,7 +179,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/drallion_ish/board.c b/board/drallion_ish/board.c index 933f3d26d5..659e9c0529 100644 --- a/board/drallion_ish/board.c +++ b/board/drallion_ish/board.c @@ -66,7 +66,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .rot_standard_ref = &lid_rot_ref, - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/dratini/board.c b/board/dratini/board.c index c906182b95..8da4e637cc 100644 --- a/board/dratini/board.c +++ b/board/dratini/board.c @@ -209,7 +209,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, enough for lid angle calculation. */ .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -236,7 +236,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/elm/board.c b/board/elm/board.c index 80cc6ff02f..1c54b71862 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -471,7 +471,7 @@ struct motion_sensor_t motion_sensors[] = { .drv_data = &g_kx022_data[0], .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(0), .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g, enough for laptop. */ + .default_range = 2, /* g, enough for lid angle calculation. */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -494,7 +494,7 @@ struct motion_sensor_t motion_sensors[] = { .drv_data = &g_kx022_data[1], .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(1), .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 = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { diff --git a/board/eve/board.c b/board/eve/board.c index e58bca9efd..42ff73643f 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -817,7 +817,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_LID_ACCEL, .i2c_spi_addr_flags = KXCJ9_ADDR0_FLAGS, .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 = { @@ -844,7 +844,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/flapjack/board.c b/board/flapjack/board.c index 4b8e7d2816..cb191c3578 100644 --- a/board/flapjack/board.c +++ b/board/flapjack/board.c @@ -528,7 +528,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .rot_standard_ref = &lid_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/fleex/board.c b/board/fleex/board.c index 564b346c18..a8ad2c08c8 100644 --- a/board/fleex/board.c +++ b/board/fleex/board.c @@ -166,7 +166,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .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 = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/garg/board.c b/board/garg/board.c index 180b20daac..3b1f7d2315 100644 --- a/board/garg/board.c +++ b/board/garg/board.c @@ -148,7 +148,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -174,7 +174,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/glados/board.c b/board/glados/board.c index 7a5a6247d2..8003e91906 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -460,7 +460,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/hatch/board.c b/board/hatch/board.c index 978a0feef1..bf1bca7291 100644 --- a/board/hatch/board.c +++ b/board/hatch/board.c @@ -251,7 +251,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] = { @@ -278,7 +278,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/helios/board.c b/board/helios/board.c index 9ddf2a0e3e..1f1f53e6c9 100644 --- a/board/helios/board.c +++ b/board/helios/board.c @@ -230,7 +230,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] = { @@ -257,7 +257,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/jinlon/board.c b/board/jinlon/board.c index 3bc5dbb771..9e9b948fd3 100644 --- a/board/jinlon/board.c +++ b/board/jinlon/board.c @@ -209,7 +209,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] = { @@ -236,7 +236,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/kindred/board.c b/board/kindred/board.c index d0e52ae070..326c276f5c 100644 --- a/board/kindred/board.c +++ b/board/kindred/board.c @@ -228,7 +228,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] = { @@ -255,7 +255,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/kodama/board.c b/board/kodama/board.c index bf6ec7dd84..f68127a9cc 100644 --- a/board/kodama/board.c +++ b/board/kodama/board.c @@ -292,7 +292,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .rot_standard_ref = &lid_standard_ref, - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/kohaku/board.c b/board/kohaku/board.c index ec0490552e..62a36b60ae 100644 --- a/board/kohaku/board.c +++ b/board/kohaku/board.c @@ -254,7 +254,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] = { @@ -281,7 +281,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/kukui/board.c b/board/kukui/board.c index 8ff3e2cda0..4b9516eb7a 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -454,7 +454,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .rot_standard_ref = &lid_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/mchpevb1/board.c b/board/mchpevb1/board.c index 8ce5ea658d..d6532bd59e 100644 --- a/board/mchpevb1/board.c +++ b/board/mchpevb1/board.c @@ -934,7 +934,7 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS( 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/meep/board.c b/board/meep/board.c index 75dfb069c3..8d725f6570 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -170,7 +170,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .rot_standard_ref = &base_standard_ref, - .default_range = 2, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/nami/board.c b/board/nami/board.c index 29a681e8d2..c244a8f91b 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -755,7 +755,7 @@ const struct motion_sensor_t lid_accel_1 = { .rot_standard_ref = &rotation_x180_z90, .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_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] = { @@ -783,7 +783,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] = { @@ -811,7 +811,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 c305d67250..854d590202 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -616,7 +616,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] = { @@ -642,7 +642,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/nocturne/board.c b/board/nocturne/board.c index f97fc83945..5b785e209b 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -192,7 +192,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ALS_GYRO, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .rot_standard_ref = &lid_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/nucleo-f411re/board.c b/board/nucleo-f411re/board.c index d5a4a67a40..b203ea4884 100644 --- a/board/nucleo-f411re/board.c +++ b/board/nucleo-f411re/board.c @@ -76,7 +76,7 @@ struct motion_sensor_t motion_sensors[] = { .drv_data = &g_bmi160_data, .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, - .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/oak/board.c b/board/oak/board.c index 3cd77454f1..e7b0653907 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -649,7 +649,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(0), .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 = { @@ -691,7 +691,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .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 = { diff --git a/board/phaser/board.c b/board/phaser/board.c index 7889b102dc..f2d9636d1c 100644 --- a/board/phaser/board.c +++ b/board/phaser/board.c @@ -153,7 +153,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .rot_standard_ref = &standard_rot_ref, - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/poppy/board.c b/board/poppy/board.c index f99b06fbf9..9faf9575b6 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -754,7 +754,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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 4caefa94fb..99751de860 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -379,7 +379,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(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/rammus/board.c b/board/rammus/board.c index a854416dda..5782ab4943 100644 --- a/board/rammus/board.c +++ b/board/rammus/board.c @@ -607,7 +607,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] = { @@ -635,7 +635,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/reef/board.c b/board/reef/board.c index 8754d17bd0..10516d6e62 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -717,7 +717,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_LID_ACCEL, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .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 = { @@ -744,7 +744,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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_mchp/board.c b/board/reef_mchp/board.c index 769f96197b..d020d407bc 100644 --- a/board/reef_mchp/board.c +++ b/board/reef_mchp/board.c @@ -963,7 +963,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_LID_ACCEL, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .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 = { @@ -990,7 +990,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_GYRO, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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 d7c4811d49..cb77dee2f9 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -334,7 +334,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LSM6DS0_ADDR1_FLAGS, .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 = { @@ -366,7 +366,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = KXCJ9_ADDR0_FLAGS, .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 = { @@ -389,7 +389,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LSM6DS0_ADDR1_FLAGS, .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 4321d53179..aece3503ae 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -403,7 +403,7 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(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 03c4c814be..d96f09834f 100644 --- a/board/strago/board.c +++ b/board/strago/board.c @@ -215,7 +215,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = KXCJ9_ADDR1_FLAGS, .rot_standard_ref = &base_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 = { @@ -238,7 +238,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = KXCJ9_ADDR0_FLAGS, .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 = { diff --git a/board/stryke/board.c b/board/stryke/board.c index 929401250d..b0400c95d0 100644 --- a/board/stryke/board.c +++ b/board/stryke/board.c @@ -251,7 +251,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] = { @@ -278,7 +278,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 = { [SENSOR_CONFIG_EC_S0] = { .odr = 10000 | ROUND_UP_FLAG, diff --git a/board/tglrvp_ish/board.c b/board/tglrvp_ish/board.c index 3c8fd36cb6..a0584410b3 100644 --- a/board/tglrvp_ish/board.c +++ b/board/tglrvp_ish/board.c @@ -47,7 +47,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR1_FLAGS, .rot_standard_ref = NULL, /* TODO rotate correctly */ - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/treeya/board.c b/board/treeya/board.c index fbcbb8aa35..b7aad5deaa 100644 --- a/board/treeya/board.c +++ b/board/treeya/board.c @@ -83,7 +83,7 @@ struct motion_sensor_t lid_accel_1 = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LIS2DWL_ADDR1_FLAGS, .rot_standard_ref = &lis2dwl_lid_standard_ref, - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = LIS2DW12_ODR_MIN_VAL, .max_frequency = LIS2DW12_ODR_MAX_VAL, .config = { @@ -113,7 +113,7 @@ struct motion_sensor_t base_accel_1 = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .rot_standard_ref = &lsm6dsm_base_standard_ref, - .default_range = 4, /* g */ + .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { diff --git a/board/trogdor/board.c b/board/trogdor/board.c index 83a5550808..d9c30571d3 100644 --- a/board/trogdor/board.c +++ b/board/trogdor/board.c @@ -529,7 +529,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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/yorp/board.c b/board/yorp/board.c index d0b6ac65fa..9bbeb28726 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -121,7 +121,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ - .default_range = 4, /* g */ + .default_range = 2, /* g */ .min_frequency = KX022_ACCEL_MIN_FREQ, .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { @@ -151,7 +151,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS, .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 = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, .config = { |