summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEnrico Granata <egranata@chromium.org>2019-02-01 14:09:18 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2019-04-26 02:55:03 +0000
commit0d78a090115fab37c8b36f274a207255816b15ae (patch)
tree530eae2678b096b30ae2091ba30f8ba96312bc1f /include
parenta8dc060e8e8bcbed3063cb6b0b0cecf6c3f8ad1c (diff)
downloadchrome-ec-0d78a090115fab37c8b36f274a207255816b15ae.tar.gz
motion_sense: send ODR events to the AP
This commits enables the EC to send a motion sense event to the AP when a sensor's ODR is changed. This is done in a way that is backwards compatible on the AP side, in order to enable previous kernels to continue to work (albeit at a loss of new functionality) with up-to-date ECs. Since clients are not required to use a FLUSH when changing ODR, it is possible for the sensor ring to get in a state where it is spreading based on out-of-date delay information, which we observed leading to spreading of overly large intervals, and thus too far into the future. This patch ameliorates that by causing an ODR change to implicitly flush the batching history. BUG=b:123700100 TEST=run CTS sensor tests, observe the sensor ring not spreading too far into the future due to a period change BRANCH=bobba Change-Id: I5a881e9fc5ddb1dbe6690c455d43dc20bffe889a Signed-off-by: Enrico Granata <egranata@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1450288 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> (cherry picked from commit bf646a9ebc3b9bf9cbf0ce64968204adf799ef2d) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1584654 Reviewed-by: Caveh Jalali <caveh@google.com> Commit-Queue: Caveh Jalali <caveh@google.com> Tested-by: Caveh Jalali <caveh@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index defa9f7edd..556cb953c3 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -2516,6 +2516,7 @@ struct ec_motion_sense_activity {
#define MOTIONSENSE_SENSOR_FLAG_TIMESTAMP (1<<1)
#define MOTIONSENSE_SENSOR_FLAG_WAKEUP (1<<2)
#define MOTIONSENSE_SENSOR_FLAG_TABLET_MODE (1<<3)
+#define MOTIONSENSE_SENSOR_FLAG_ODR (1<<4)
/*
* Send this value for the data element to only perform a read. If you