Debian Codegraph @

src/mainboard/lenovo/x201/acpi/platform.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /* The _PTS method (Prepare To Sleep) is called before the OS is
4 * entering a sleep state. The sleep state number is passed in Arg0
5 */
6
7 Method(_PTS,1)
8 {
9 \_SB.PCI0.LPCB.EC.MUTE(1)
10 \_SB.PCI0.LPCB.EC.USBP(0)
11 \_SB.PCI0.LPCB.EC.RADI(0)
12 }
13
14 /* The _WAK method is called on system wakeup */
15
16 Method(_WAK,1)
17 {
18 /* Wake the HKEY to init BT/WWAN */
19 \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0)
20
21 /* Not implemented. */
22 Return(Package(){0,0})
23 }
24
25 /* System Bus */
26
27 Scope(\_SB)
28 {
29 /* This method is placed on the top level, so we can make sure it's the
30 * first executed _INI method.
31 */
32 Method(_INI, 0)
33 {
34 /* Determine the Operating System and save the value in OSYS.
35 * We have to do this in order to be able to work around
36 * certain windows bugs.
37 *
38 * OSYS value | Operating System
39 * -----------+------------------
40 * 2000 | Windows 2000
41 * 2001 | Windows XP(+SP1)
42 * 2002 | Windows XP SP2
43 * 2006 | Windows Vista
44 * ???? | Windows 7
45 */
46
47 /* Let's assume we're running at least Windows 2000 */
48 OSYS = 2000
49
50 If (CondRefOf(_OSI)) {
51 If (_OSI("Windows 2001")) {
52 OSYS = 2001
53 }
54
55 If (_OSI("Windows 2001 SP1")) {
56 OSYS = 2001
57 }
58
59 If (_OSI("Windows 2001 SP2")) {
60 OSYS = 2002
61 }
62
63 If (_OSI("Windows 2001.1")) {
64 OSYS = 2001
65 }
66
67 If (_OSI("Windows 2001.1 SP1")) {
68 OSYS = 2001
69 }
70
71 If (_OSI("Windows 2006")) {
72 OSYS = 2006
73 }
74
75 If (_OSI("Windows 2006.1")) {
76 OSYS = 2006
77 }
78
79 If (_OSI("Windows 2006 SP1")) {
80 OSYS = 2006
81 }
82
83 If (_OSI("Windows 2009")) {
84 OSYS = 2009
85 }
86
87 If (_OSI("Windows 2012")) {
88 OSYS = 2012
89 }
90 }
91 }
92 }