diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-12-08 02:02:00 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-17 23:07:30 +0000 |
commit | 992810a77dd3698e69bcedd84f8259a08a753cb9 (patch) | |
tree | b4f968f0916ed96bcbd10a206c02ae4328cf8ff6 /board/kindred/board.c | |
parent | b8d97655fc0c5b19042fc1c28384c0580debb9c0 (diff) | |
download | chrome-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/kindred/board.c')
-rw-r--r-- | board/kindred/board.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |