summaryrefslogtreecommitdiff
path: root/include/accelgyro.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-08-25 18:52:19 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-08-29 01:34:14 -0700
commit4e7e1bb796190e658ea2de8d4e391efa59b0d643 (patch)
treec6927e9226f1853ce2602cc71d6399f7ad210860 /include/accelgyro.h
parent398bd9a0178c0120a2dbf3f58419d6a5360dfb3d (diff)
downloadchrome-ec-4e7e1bb796190e658ea2de8d4e391efa59b0d643.tar.gz
motion_sense: Add more complex EC/AP sensor rate support.
Add config settings for ODR and EC rate per requestor and per power state (1 for the AP, 3 for the EC). This way we can finely set ec rate and ODR depending on usage. On chromeos, AP is not setting frequency, so EC sets for different power state. On some platform, sensors can now be suspended in S3/S5. Allow EC oversampling when AP is only looking for a few samples. It is useful for double tap detection where high accelerator ODR is required. BRANCH=ryu TEST=Tested on Ryu BUG=chromium:513458 Change-Id: Ic3888a749699f07b10c5da3bc07204afd4de70da Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/295637
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r--include/accelgyro.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index c65e624bf4..46ab68d855 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -120,4 +120,10 @@ struct accelgyro_drv {
#endif
};
+/* Used to save sensor information */
+struct accelgyro_saved_data_t {
+ int odr;
+ int range;
+};
+
#endif /* __CROS_EC_ACCELGYRO_H */