Commit Graph

2 Commits

Author SHA1 Message Date
Bill Richardson
43806f07e3 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>
2015-01-21 05:05:47 +00:00
Bill Richardson
f23e68d721 Add ALS driver for light sensors connected to EC
This adds the driver and a console command to read an Intersil ISL29305
light sensor connected to the EC.

BUG=chrome-os-partner:23380
BRANCH=samus
TEST=manual

Run the "als" command from the EC console, while pointing the sensor in
various directions. It should give higher numbers when facing a light
source.  If you get "Error 1", it means the ALS isn't powered.

Change-Id: I855ed64dab7fc60e29126ab3e97669be24dc6a64
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176056
2013-11-07 23:42:56 +00:00