summaryrefslogtreecommitdiff
path: root/driver/als_si114x.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-11-30 13:25:14 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-12-01 01:11:11 -0800
commit02ddede08eb66c752b868c86293eff8fed9e8160 (patch)
tree6ca1f9b891a207ad3970024efe4909ad7cc5c6d4 /driver/als_si114x.h
parent7f6862e5e080a20b3ebe089d3a6e8ea0d9f7bd4e (diff)
downloadchrome-ec-02ddede08eb66c752b868c86293eff8fed9e8160.tar.gz
device: si114x: Address overflow condition
If proximity overflow (daylight), we would still assume the data was valid and consider there is an object very very close. That would prevent the light to be measured. (cl/312982) Leave the value as max range for the HAL to handle. BRANCH=smaug BUG=b:25573958 TEST=Check in daylight that light is still measured Change-Id: I684e6f4a9aecd3fd6b338a9939f7ede26752ecb8 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/314921 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'driver/als_si114x.h')
-rw-r--r--driver/als_si114x.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/driver/als_si114x.h b/driver/als_si114x.h
index c044a8bddf..93e9b9a9bc 100644
--- a/driver/als_si114x.h
+++ b/driver/als_si114x.h
@@ -206,6 +206,7 @@
/* Proximity sensor finds an object within 5 cm, disable light sensor */
#define SI114X_COVERED_THRESHOLD 5
+#define SI114X_OVERFLOW 0xffff
extern const struct accelgyro_drv si114x_drv;