diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2018-11-27 12:50:42 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-03 03:11:54 -0800 |
commit | 77b306b340ca428ba6785add204ccdce82185274 (patch) | |
tree | c7bb8333c3ebdfb13463285885c8c5ebbbbf4893 /driver/mag_lis2mdl.h | |
parent | 45189f94d9684c88200c71bc781bfd983277a8aa (diff) | |
download | chrome-ec-77b306b340ca428ba6785add204ccdce82185274.tar.gz |
sensor: Adjust max_frequency based on EC performance
Put in max_frequency a value that the sensor AND the EC support.
BRANCH=none
BUG=b:118205424,b:118851581,chromium:615059
TEST=Compile. Check all max sensors frequencies have been altered with:
for i in $(grep -rh max_frequency board | cut -d '=' -f 2 | sort | \
uniq | grep FREQ | sed 's/FREQ.*//') ; do
echo -n $i ; git show | grep -q $i || break;
echo check
done
Check on nocturne accel max frequency is still correct.
Change-Id: I848396d9f150a2e94d430a8feeafc1087a6bf2c3
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1352063
Commit-Ready: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-by: Jesse Schettler <jschettler@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'driver/mag_lis2mdl.h')
-rw-r--r-- | driver/mag_lis2mdl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/mag_lis2mdl.h b/driver/mag_lis2mdl.h index ae7907c225..13e1b422e4 100644 --- a/driver/mag_lis2mdl.h +++ b/driver/mag_lis2mdl.h @@ -29,6 +29,9 @@ #define LIS2MDL_ODR_MIN_VAL 10000 #define LIS2MDL_ODR_MAX_VAL 100000 +#if (CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ <= LIS2MDL_ODR_MAX_VAL) +#error "EC too slow for magnetometer" +#endif extern const struct accelgyro_drv lis2mdl_drv; |