From d0e1c2394c641afdbd633e9393131fe03fdefa9f Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 8 Sep 2015 11:51:25 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/301134 Reviewed-by: Alec Berg --- include/motion_sense.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/motion_sense.h') 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 -- cgit v1.2.1