summaryrefslogtreecommitdiff
path: root/common/motion_sense.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-11-27 12:50:42 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-03 03:11:54 -0800
commit77b306b340ca428ba6785add204ccdce82185274 (patch)
treec7bb8333c3ebdfb13463285885c8c5ebbbbf4893 /common/motion_sense.c
parent45189f94d9684c88200c71bc781bfd983277a8aa (diff)
downloadchrome-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 'common/motion_sense.c')
-rw-r--r--common/motion_sense.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index c4c380629b..6e29a070c9 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -1150,13 +1150,7 @@ static int host_cmd_motion_sense(struct host_cmd_handler_args *args)
out->info.chip = sensor->chip;
if (args->version >= 3) {
out->info_3.min_frequency = sensor->min_frequency;
- /*
- * Make sure reported max frequency for this sensor
- * doesn't exceed the max sensor frequency the EC is
- * capable of supporting
- */
- out->info_3.max_frequency = MIN(sensor->max_frequency,
- CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ);
+ out->info_3.max_frequency = sensor->max_frequency;
out->info_3.fifo_max_event_count = MAX_FIFO_EVENT_COUNT;
args->response_size = sizeof(out->info_3);
} else {