summaryrefslogtreecommitdiff
path: root/common/ec_features.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-07-02 13:17:47 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-03 22:31:05 -0700
commitfec3c3c7ec17aaa92332b3128ce3afd352585bed (patch)
tree59157ab3eac4cf5f6f0ffb6c395f2e78e0dbab45 /common/ec_features.c
parent797146cb4c63a00a9535ad92fcbb75e65d98d688 (diff)
downloadchrome-ec-fec3c3c7ec17aaa92332b3128ce3afd352585bed.tar.gz
sensor: Add flag for tight timestamping
Kernel needs to be aware of the the new timestamp code to apply proper filtering/spreading. This flag set means that timestamps are always after every sensor sample, and both timestamps (sensor sample and fifo info) are recorded with minimal latency and jitter. TEST=Add 'dev_err(dev, "feature 36 = %d\n", cros_ec_check_features(ec, 36));' in kernel/drivers/platform/chrome/cros_ec_dev.c See the bit set (16, not 0) in dmesg. BUG=b/111079027, b/109786990 Change-Id: Ia71703e035d7a6eac1e0a483caa62b7c75e5cb2a Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1123218
Diffstat (limited to 'common/ec_features.c')
-rw-r--r--common/ec_features.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/ec_features.c b/common/ec_features.c
index bf4ef03011..ec483ad47f 100644
--- a/common/ec_features.c
+++ b/common/ec_features.c
@@ -125,6 +125,9 @@ uint32_t get_feature_flags1(void)
#ifdef CONFIG_CEC
| EC_FEATURE_MASK_1(EC_FEATURE_CEC)
#endif
+#ifdef CONFIG_ACCEL_FIFO
+ | EC_FEATURE_MASK_1(EC_FEATURE_MOTION_SENSE_TIGHT_TIMESTAMPS)
+#endif
;
#ifdef CONFIG_EC_FEATURE_BOARD_OVERRIDE
result = board_override_feature_flags1(result);