summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-11-09 15:58:55 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2016-11-12 19:22:09 +0000
commit6565c7cea12dfcd7aac08a78cde70dab2e7f34de (patch)
tree4f32f39eef6c048f0a570dbaef900894076e314e
parent2b23a6d508f88f587e2a36837a43a38fe6b11537 (diff)
downloadchrome-ec-6565c7cea12dfcd7aac08a78cde70dab2e7f34de.tar.gz
UPSTREAM: motion: cleanup include file
Use test_export_static for static variable/function that needs to by used by tests/motion_lid.c BRANCH=smau, cyan BUG=b:27849483 TEST=Compile, make buildall -j Change-Id: I2f3eb72ce319622842885be9125b91e58f47133a Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/311754 Reviewed-by: Alec Berg <alecaberg@chromium.org> (cherry picked from commit 0922cc81ce22204264a2b96cec4bf2195939e516) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/359394 Reviewed-on: https://chromium-review.googlesource.com/409481 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--common/motion_sense.c6
-rw-r--r--include/motion_sense.h4
-rw-r--r--test/motion_lid.c2
3 files changed, 5 insertions, 7 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 0a2f8d11e5..c72165bc7e 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -34,7 +34,7 @@
/*
* Sampling interval for measuring acceleration and calculating lid angle.
*/
-unsigned int motion_interval;
+test_export_static unsigned int motion_interval;
/* Delay between FIFO interruption. */
static unsigned int motion_int_interval;
@@ -62,7 +62,7 @@ static struct mutex g_sensor_mutex;
/*
* Current power level (S0, S3, S5, ...)
*/
-enum chipset_state_mask sensor_active;
+test_export_static enum chipset_state_mask sensor_active;
#ifdef CONFIG_ACCEL_FIFO
/* Need to wake up the AP */
@@ -296,7 +296,7 @@ static int motion_sense_ec_rate(struct motion_sensor_t *sensor)
*
* Note: Not static to be tested.
*/
-int motion_sense_set_motion_intervals(void)
+static int motion_sense_set_motion_intervals(void)
{
int i, sensor_ec_rate, ec_rate = 0, ec_int_rate_ms = 0, wake_up = 0;
struct motion_sensor_t *sensor;
diff --git a/include/motion_sense.h b/include/motion_sense.h
index 156b898f05..ee148d7ca9 100644
--- a/include/motion_sense.h
+++ b/include/motion_sense.h
@@ -138,10 +138,6 @@ extern unsigned motion_sensor_count;
#else
extern const unsigned motion_sensor_count;
#endif
-/* For testing purposes: export the sampling interval. */
-extern enum chipset_state_mask sensor_active;
-extern unsigned motion_interval;
-int motion_sense_set_motion_intervals(void);
/*
* Priority of the motion sense resume/suspend hooks, to be sure associated
diff --git a/test/motion_lid.c b/test/motion_lid.c
index 9db6815b1e..cd31a59a72 100644
--- a/test/motion_lid.c
+++ b/test/motion_lid.c
@@ -19,6 +19,8 @@
#include "timer.h"
#include "util.h"
+extern enum chipset_state_mask sensor_active;
+extern unsigned motion_interval;
/*
* Period in us for the motion task period.