Debian Codegraph @

src/mainboard/samsung/lumpy/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 GP35 = 0 // Disable WLAN
10 GP38 = 0 // Disable WWAN
11
12 If (S33G) {
13 GP43 = 0 // Enable HSPA
14 } Else {
15 GP43 = 1 // Disable HSPA
16 }
17
18 If (Arg0 == 3) {
19 // NVS has a flag to determine USB policy in S3
20 If (S3U0) {
21 GP47 = 1 // Enable USB0
22 } Else {
23 GP47 = 0 // Disable USB0
24 }
25
26 // NVS has a flag to determine USB policy in S3
27 If (S3U1) {
28 GP56 = 1 // Enable USB1
29 } Else {
30 GP56 = 0 // Disable USB1
31 }
32 }
33 If (Arg0 == 5) {
34 // NVS has a flag to determine USB policy in S5
35 If (S5U0) {
36 GP47 = 1 // Enable USB0
37 } Else {
38 GP47 = 0 // Disable USB0
39 }
40
41 // NVS has a flag to determine USB policy in S5
42 If (S5U1) {
43 GP56 = 1 // Enable USB1
44 } Else {
45 GP56 = 0 // Disable USB1
46 }
47 }
48 }
49
50 /* The _WAK method is called on system wakeup */
51
52 Method(_WAK,1)
53 {
54 /* Update in case state changed while asleep */
55 \PWRS = \_SB.PCI0.LPCB.EC0.ACEX
56
57 /* Enable OS control of fan */
58 \_SB.PCI0.LPCB.EC0.FCOS = 1
59
60 Return(Package(){0,0})
61 }