summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-01-31 10:44:52 -0800
committerJustin TerAvest <teravest@chromium.org>2019-02-08 17:52:01 +0000
commitb716f1c9d90e4f6f2249698819a21441eb58df7e (patch)
tree93790678316c265fda65f4f39267528253f0bc75 /include
parente84e5b983370cc5349dbd18d3380b09ff8fa3f31 (diff)
downloadchrome-ec-b716f1c9d90e4f6f2249698819a21441eb58df7e.tar.gz
common: sensor: Honor roundup flag for range
Look for ROUND_UP_FLAG in default_range when setting the default range. BUG=b:115587004 BRANCH=octopus TEST=On meep check range is set at ~1145dps, not 572dps after reboot. Change-Id: Ic13fb65b5cfabbebf70b2a5d75abf8faf4b50321 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1448811 Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'include')
-rw-r--r--include/motion_sense.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h
index 2d81c9b003..6733fee8dc 100644
--- a/include/motion_sense.h
+++ b/include/motion_sense.h
@@ -44,6 +44,7 @@ enum sensor_config {
#define ROUND_UP_FLAG (1 << 31)
#define BASE_ODR(_odr) ((_odr) & ~ROUND_UP_FLAG)
+#define BASE_RANGE(_range) ((_range) & ~ROUND_UP_FLAG)
#ifdef CONFIG_ACCEL_FIFO
#define MAX_FIFO_EVENT_COUNT CONFIG_ACCEL_FIFO