summaryrefslogtreecommitdiff
path: root/include/als.h
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-01-15 17:01:45 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-21 05:05:47 +0000
commit43806f07e35de0ab9b27774e2f27841a78a2c527 (patch)
tree3a117ae15a5810dd9e24a57722b33fa6c686ff97 /include/als.h
parentb1f0de7b37e2730836b056c1672739b123d403e6 (diff)
downloadchrome-ec-43806f07e35de0ab9b27774e2f27841a78a2c527.tar.gz
samus: Add scale factor to account for ALS attenuation
This adds a sensor-specific attentuation factor, which will be applied to the ALS raw sensor readings on the EC. This is to account for the attenutation due to glass, tinting, etc. BUG=chrome-os-partner:34590 BRANCH=ToT,Samus TEST=manual In a root shell, run this: cd /sys/bus/acpi/drivers/acpi_als/ACPI0008:00/iio:device1 while true; do cat in_illuminance_raw; sleep 1 ;done Shine a flashlight on the ALS. Note that the readings are 5X higher than they were before this CL. Change-Id: I2a53872ecb5fab62e5f443d43588a26d3d7e697f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/241191 Reviewed-by: Bryan Freed <bfreed@chromium.org>
Diffstat (limited to 'include/als.h')
-rw-r--r--include/als.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/als.h b/include/als.h
index e229a3791f..c2a4e3a01e 100644
--- a/include/als.h
+++ b/include/als.h
@@ -14,7 +14,8 @@ enum als_id;
/* Initialized in board.c */
struct als_t {
const char const *name;
- int (*read)(int *lux);
+ int (*read)(int *lux, int af);
+ int attenuation_factor;
};
extern struct als_t als[];