summaryrefslogtreecommitdiff
path: root/board/nami
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/nami
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/nami')
-rw-r--r--board/nami/board.c6
1 files changed, 3 insertions, 3 deletions
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] = {