diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-09-08 11:51:25 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-29 19:38:21 -0700 |
commit | d0e1c2394c641afdbd633e9393131fe03fdefa9f (patch) | |
tree | a2561e8865a92ec480e90ba25d88a5491d57b999 /include/motion_sense.h | |
parent | 1092919c51101cdbee266f21a493d95c7f0cd77c (diff) | |
download | chrome-ec-d0e1c2394c641afdbd633e9393131fe03fdefa9f.tar.gz |
common: motion: Separate motion task interval from AP configuration
Some sensors are in forced mode, motion sense must be scheduled at
their ODR. However the host may not want the data right away,
so motion task may not wake up the host that often.
Add a new variable motion_int_interval that defines the maximum interval
between FIFO host event.
BRANCH=smaug
BUG=chrome-os-partner:43800
TEST=Check that light sensor is polled at ODR frequency.
Check that when AP does not want any event, no FIFO host event are
requested.
Check CTS tests work as before.
Reenable motion_lid unit test.
Change-Id: Ie25e6cbe28fed899073856057855ffa03c0cd9fd
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/301134
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index ec2219a0e3..ff99c40af4 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -137,8 +137,8 @@ extern const unsigned motion_sensor_count; /* For testing purposes: export the sampling interval. */ extern enum chipset_state_mask sensor_active; -extern unsigned accel_interval; -int motion_sense_set_accel_interval(void); +extern unsigned motion_interval; +int motion_sense_set_motion_intervals(void); /* * Priority of the motion sense resume/suspend hooks, to be sure associated |