1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/* SPDX-License-Identifier: GPL-2.0-only */
Device (ADP1)
{
Name (_HID, "ACPI0003")
Name (_PCL, Package () { \_SB })
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (ECON == 1)
{
Local0 = 0x0F
}
Else
{
Local0 = 0
}
Return (Local0)
}
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
{
If (ECWR & 0x01)
{
\PWRS = 1
}
Else
{
\PWRS = 0
}
Return (\PWRS)
}
}
Method (_QA0, 0, NotSerialized) // AC Power Connected
{
If (ECWR & 0x01)
{
\PWRS = 1
}
Else
{
\PWRS = 0
}
// 500ms delay - Not used in coreboot
// Sleep (500)
Notify (BAT0, 0x81)
// Sleep (500)
Notify (ADP1, 0x80)
}
Method(_Q0B, 0, NotSerialized) // Battery Connected
{
// 500ms delay - Not used in coreboot
// Sleep (500)
Notify (BAT0, 0x81)
// Sleep (500)
Notify (BAT0, 0x80)
}
|