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/als_opt3001.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/als_opt3001.h')
-rw-r--r-- | driver/als_opt3001.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/als_opt3001.h b/driver/als_opt3001.h index eeb05f3a10..d2d2737e20 100644 --- a/driver/als_opt3001.h +++ b/driver/als_opt3001.h @@ -39,6 +39,9 @@ enum opt3001_mode { /* Min and Max sampling frequency in mHz */ #define OPT3001_LIGHT_MIN_FREQ 1250 #define OPT3001_LIGHT_MAX_FREQ 10000 +#if (CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ <= OPT3001_LIGHT_MAX_FREQ) +#error "EC too slow for light sensor" +#endif #ifdef HAS_TASK_ALS int opt3001_init(void); |