blob: 35468b2c37409f5eb6da1be986d8648286e46cd0 [file] [log] [blame]
Duncan Laurie612163eb2014-06-13 10:35:22 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Duncan Laurie612163eb2014-06-13 10:35:22 -070014 */
15
16Device (ALS)
17{
18 Name (_HID, "ACPI0008")
19 Name (_UID, 1)
20
21 Method (_STA, 0, NotSerialized)
22 {
23 Return (0xF)
24 }
25
26 /*
27 * Returns the current ambient light illuminance reading in lux
28 *
29 * 0: Reading is below the range of sensitivity of the sensor
30 * -1: Reading is above the range or sensitivity of the sensor
31 */
32 Method (_ALI, 0, NotSerialized)
33 {
34 Return (^^ALS0)
35 }
36
37 /*
38 * Returns a recommended polling frequency in tenths of seconds
39 *
40 * 0: No need to poll, async notifications will indicate changes
41 */
42 Name (_ALP, 10)
43
44 /*
45 * Returns a package of packages where each tuple consists of a pair
46 * of integers mapping ambient light illuminance to display brightness.
47 *
48 * {<display luminance adjustment>, <ambient light illuminance>}
49 *
50 * Ambient light illuminance values are specified in lux.
51 *
52 * Display luminance adjustment values are relative percentages where
53 * 100 is no (0%) display brightness adjustment. Values <100 indicate
54 * negative adjustment (dimming) and values >100 indicate positive
55 * adjustment (brightening).
56 *
57 * This is currently unused by the Linux kernel ACPI ALS driver but
58 * is required by the ACPI specification so just define a basic two
59 * point response curve.
60 */
61 Name (_ALR, Package ()
62 {
63 Package () { 70, 30 }, // Min { -30% adjust at 30 lux }
64 Package () { 150, 1000 } // Max { +50% adjust at 1000 lux }
65 })
66}