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