summaryrefslogtreecommitdiff
path: root/driver/als_isl29035.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove __7b, __8b and __7bfDenis Brockus2019-07-201-4/+4
| | | | | | | | | | | | | | | | | | | The extentions were added to make the compiler perform most of the verification that the conversion was being done correctly to remove 8bit addressing as the standard I2C/SPI address type. Now that the compiler has verified the code, the extra extentions are being removed BUG=chromium:971296 BRANCH=none TEST=make buildall -j TEST=verify sensor functionality on arcada_ish Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Use 7bit I2C/SPI slave addresses in ECDenis Brockus2019-07-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt for 7bit slave addresses in EC code. If 8bit is expected by a driver, make it local and show this in the naming. Use __7b, __7bf and __8b as name extensions for i2c/spi addresses used in the EC codebase. __7b indicates a 7bit address by itself. __7bf indicates a 7bit address with optional flags attached. __8b indicates a 8bit address by itself. Allow space for 10bit addresses, even though this is not currently being used by any of our attached devices. These extensions are for verification purposes only and will be removed in the last pass of this ticket. I want to make sure the variable names reflect the type to help eliminate future 7/8/7-flags confusion. BUG=chromium:971296 BRANCH=none TEST=make buildall -j Change-Id: I2fc3d1b52ce76184492b2aaff3060f486ca45f45 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699893 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-191-1/+1
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ALS: Disable the ALS task if all the ALS inits failVijay Hiremath2015-10-021-6/+2
| | | | | | | | | | | | | | | BUG=none TEST=Manually tested on Kunimitsu & Strago. Removed the ALS sensor from DUT, using "taskinfo" console command observed that the ALS task is not running. BRANCH=none Change-Id: I96cb720bd8d70033d433cdc2cd9cea9b56a3b389 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/301753 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
* samus: Add scale factor to account for ALS attenuationBill Richardson2015-01-211-5/+10
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Add EC_MEMMAP_ALS, update it once per secondBill Richardson2013-11-081-12/+19
| | | | | | | | | | | | | | | | | | | | | | This adds space for up to two ALS lux readings to be available to the AP through the memory-mapped LPC region. If enabled, the values are updated once a second. The ALS will be reinitialized at every AP resume, since it's typically unpowered otherwise. The reported value will be zero when the ALS is off. BUG=chrome-os-partner:23380 BRANCH=samus TEST=manual Boot the AP, then from the EC console run "als" or just monitor the memory-mapped region directly ("rw 0x40080780" on Samus), while pointing the sensor at bright and dim areas. The value should change. Change-Id: I705371fcd57345dc9adae1231ea30c7ff024aaf8 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/176142 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add ALS driver for light sensors connected to ECBill Richardson2013-11-071-0/+65
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