summaryrefslogtreecommitdiff
path: root/include/motion_sense.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-12-27 16:19:05 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-16 18:03:59 -0800
commit484ef121193865225ddbc3a0b848db7f5384f836 (patch)
tree804173045dad81b2a2839df75c412e874e8d9154 /include/motion_sense.h
parent69c3fc2378ee9026277c1cbaf6e8aff0b99ecf46 (diff)
downloadchrome-ec-484ef121193865225ddbc3a0b848db7f5384f836.tar.gz
motion: Add opt3001 as a motion sensor
Use the motion sensor to manage ALS as well. The current interface (via memmap) is preserved, but we can also access the sensor via cros ec sensor stack and send the ALS information to ARC++. BUG=chrome-os-partner:59423 BRANCH=reef CQ-DEPEND=CL:424217 TEST=Check the sensor is working via ACPI sensor and cros ec sensor. Check ARC++ sees the sensors. Change-Id: Iaf608370454ad582691b72b471ea87b511863a78 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/424323 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r--include/motion_sense.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h
index 3e56e7597b..0ca7443b98 100644
--- a/include/motion_sense.h
+++ b/include/motion_sense.h
@@ -146,6 +146,10 @@ struct motion_sensor_t {
/* Defined at board level. */
extern struct motion_sensor_t motion_sensors[];
extern const unsigned motion_sensor_count;
+#if (!defined HAS_TASK_ALS) && (defined CONFIG_ALS)
+/* Needed if reading ALS via LPC is needed */
+extern const struct motion_sensor_t *motion_als_sensors[];
+#endif
/* optionally defined at board level */
extern unsigned int motion_min_interval;