summaryrefslogtreecommitdiff
path: root/driver/als_opt3001.h
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@chromium.org>2017-04-25 19:09:03 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-18 21:05:23 -0700
commit9a0d0aa70d483be79c71a459dfd5f5e89da2638d (patch)
tree5e61d14a77ec938ce1508dbc61a271e0dfb15ee0 /driver/als_opt3001.h
parentd7eefeffb927cfd311d40c00ce817937eab4cb61 (diff)
downloadchrome-ec-9a0d0aa70d483be79c71a459dfd5f5e89da2638d.tar.gz
common: sensors: add extra sensor attributes
Adds min_frequency and max_frequency to struct motion_sensor_t. New attributes min_frequency and max_frequency are now returned in ectool's MOTIONSENSE_CMD_INFO response. Incremented ectool's MOTIONSENSE_CMD_INFO version to version 3. Add constants for MIN_FREQUENCY and MAX_FREQUENCY to each sensor's header file. BRANCH=none BUG=chromium:615059 TEST=build/boot and verify MOTIONSENSE_CMD_INFO response on kevin, make buildall -j passes. Change-Id: I66db9715c122ef6bb4665ad5d086a9ecc9c7c93a Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/482703 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/als_opt3001.h')
-rw-r--r--driver/als_opt3001.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/als_opt3001.h b/driver/als_opt3001.h
index b70909f630..9850dfe723 100644
--- a/driver/als_opt3001.h
+++ b/driver/als_opt3001.h
@@ -36,6 +36,10 @@ enum opt3001_mode {
#define OPT3001_MANUFACTURER_ID 0x5449
#define OPT3001_DEVICE_ID 0x3001
+/* Min and Max sampling frequency in mHz */
+#define OPT3001_LIGHT_MIN_FREQ 1250
+#define OPT3001_LIGHT_MAX_FREQ 10000
+
#ifdef HAS_TASK_ALS
int opt3001_init(void);
int opt3001_read_lux(int *lux, int af);