summaryrefslogtreecommitdiff
path: root/board/garg/board.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-12-08 02:02:00 -0800
committerCommit Bot <commit-bot@chromium.org>2019-12-17 23:07:30 +0000
commit992810a77dd3698e69bcedd84f8259a08a753cb9 (patch)
treeb4f968f0916ed96bcbd10a206c02ae4328cf8ff6 /board/garg/board.c
parentb8d97655fc0c5b19042fc1c28384c0580debb9c0 (diff)
downloadchrome-ec-992810a77dd3698e69bcedd84f8259a08a753cb9.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. BUG=b:144004449 BRANCH=none TEST=compile Change-Id: If8c14b2e928c9c70c0ce51451adcfcd674a9e73b Signed-off-by: Gwendal Grignou <gwendal@chromium.org> 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>
Diffstat (limited to 'board/garg/board.c')
-rw-r--r--board/garg/board.c4
1 files changed, 2 insertions, 2 deletions
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 = {