summaryrefslogtreecommitdiff
path: root/board/poppy/board.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2017-10-27 15:07:19 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-30 14:03:10 -0700
commit8a2d0a5de6fc03eeea79a65469b361ae0ca694c9 (patch)
tree3e1c1825a8e3c054097fa8f4ce5b8b036ef25846 /board/poppy/board.c
parenta0f43d59d0b58390b22b7e9b58e2b7a799db4070 (diff)
downloadchrome-ec-8a2d0a5de6fc03eeea79a65469b361ae0ca694c9.tar.gz
driver: BMM150: Set max frequency based on repetitions setting
The compass uses oversampling to produce accurate values. MAX_ODR is functions of the repetitions setting. 80Hz is too high, calculate the frequency based on preset setting. Currently, we use 'SPECIAL' that was calculated for Ryu. BUG=b:68394559 BRANCH=eve,reef,poppy TEST=Check with ectool motionsense info 3 the frequency is around 30Hz. Before: Min Frequency: 781 mHz Max Frequency: 80000 mHz After: Min Frequency: 781 mHz Max Frequency: 29579 mHz Check with AIDA64 the compass is not stuck and return changing values. Fixup of CL/570482 Change-Id: Idcfed1418f59e755e5647d018351c6a7397ffe1b Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/742146 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/poppy/board.c')
-rw-r--r--board/poppy/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/poppy/board.c b/board/poppy/board.c
index f2027516f2..60cdff40dd 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -998,7 +998,7 @@ struct motion_sensor_t motion_sensors[] = {
.default_range = 1 << 11, /* 16LSB / uT, fixed */
.rot_standard_ref = &mag_standard_ref,
.min_frequency = BMM150_MAG_MIN_FREQ,
- .max_frequency = BMM150_MAG_MAX_FREQ,
+ .max_frequency = BMM150_MAG_MAX_FREQ(SPECIAL),
.config = {
/* AP: by default shutdown all sensors */
[SENSOR_CONFIG_AP] = {