From 992810a77dd3698e69bcedd84f8259a08a753cb9 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Sun, 8 Dec 2019 02:02:00 -0800 Subject: 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. BUG=b:144004449 BRANCH=none TEST=compile Change-Id: If8c14b2e928c9c70c0ce51451adcfcd674a9e73b Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957375 Reviewed-by: Justin TerAvest Reviewed-by: Alexandru M Stan --- board/oak/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board/oak') 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 = { -- cgit v1.2.1