From 612163ebaae60b0bc724324abb882f995072b104 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Fri, 13 Jun 2014 10:35:22 -0700 Subject: chrome ec: Add ACPI Device for ALS if enabled The EC can export ALS information if the sensor is attached to it directly rather than to the host. This adds a basic ACPI ALS device and implements the required information. The kernel does not use the _ALR tuple set but it is required by the ACPI spec so this just adds the sample two point response curve defined in ACPI 5.0 section 9.2.5. The EC does not currently send events for lux value changes so a polling interval of 1 second is defined. BUG=chrome-os-partner:24208 BRANCH=None TEST=build and boot on samus, add acpi-als driver to the kernel and read /sys/bus/iio/devices/iio:device0/in_illuminance_raw Original-Change-Id: Id29b72a68aa21c1a7c71d5f87223ac010cef0377 Original-Signed-off-by: Duncan Laurie Original-Reviewed-on: https://chromium-review.googlesource.com/203743 Original-Reviewed-by: Aaron Durbin (cherry picked from commit 81f44b33b87a6ee3079b8ef6efffacd0eeb0283f) Signed-off-by: Marc Jones Change-Id: I5a0ccd30e8b453675beaf7d0363dbfa162bd5b3f Reviewed-on: http://review.coreboot.org/8132 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/ec/google/chromeec/acpi/ec.asl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ec/google/chromeec/acpi/ec.asl') diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index 650efd2573..2760f195d0 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -431,4 +431,8 @@ Device (EC0) #include "ac.asl" #include "battery.asl" + +#ifdef EC_ENABLE_ALS_DEVICE + #include "als.asl" +#endif } -- cgit v1.2.3