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
|
/* SPDX-License-Identifier: GPL-2.0-only */
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D"))
Method (_STA, 0, NotSerialized)
{
DEBUG = "---> IT8987 LID: _STA"
Return (0x0F)
}
Method (_PSW, 1, NotSerialized)
{
DEBUG = Concatenate ("---> IT8987 LID: _PSW", ToHexString(Arg0))
}
Method (_LID, 0, NotSerialized)
{
DEBUG = "---> IT8987 LID: _LID"
If (\_SB.PCI0.LPCB.H_EC.ECRD (RefOf (\_SB.PCI0.LPCB.H_EC.LSTE)) == 0x01)
{
Local0 = 1
}
else
{
Local0 = 0
}
Return (Local0)
}
}
Method (_Q0C, 0, NotSerialized) // Lid close event
{
DEBUG = "---> IT8987 LID: Q0C (close event)"
LIDS = 0
\LIDS = LIDS
Notify (LID0, 0x80)
}
Method (_Q0D, 0, NotSerialized) // Lid open event
{
DEBUG = "---> IT8987 LID: Q0D (open event)"
LIDS = 1
\LIDS = LIDS
Notify (LID0, 0x80)
}
|