1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2014 Google Inc. 4 */ 5 6Device (ALS) 7{ 8 Name (_HID, "ACPI0008") 9 Name (_UID, 1) 10 11 Method (_STA, 0, NotSerialized) 12 { 13 Return (0xF) 14 } 15 16 /* 17 * Returns the current ambient light illuminance reading in lux 18 * 19 * 0: Reading is below the range of sensitivity of the sensor 20 * -1: Reading is above the range or sensitivity of the sensor 21 */ 22 Method (_ALI, 0, NotSerialized) 23 { 24 Return (^^ALS0) 25 } 26 27 /* 28 * Returns a recommended polling frequency in tenths of seconds 29 * 30 * 0: No need to poll, async notifications will indicate changes 31 */ 32 Name (_ALP, 10) 33 34 /* 35 * Returns a package of packages where each tuple consists of a pair 36 * of integers mapping ambient light illuminance to display brightness. 37 * 38 * {<display luminance adjustment>, <ambient light illuminance>} 39 * 40 * Ambient light illuminance values are specified in lux. 41 * 42 * Display luminance adjustment values are relative percentages where 43 * 100 is no (0%) display brightness adjustment. Values <100 indicate 44 * negative adjustment (dimming) and values >100 indicate positive 45 * adjustment (brightening). 46 * 47 * This is currently unused by the Linux kernel ACPI ALS driver but 48 * is required by the ACPI specification so just define a basic two 49 * point response curve. 50 */ 51 Name (_ALR, Package () 52 { 53 Package () { 70, 30 }, // Min { -30% adjust at 30 lux } 54 Package () { 150, 1000 } // Max { +50% adjust at 1000 lux } 55 }) 56} 57