blob: 3cf021eb3a6eecaea00293f3c752a591afa3c118 [file] [log] [blame]
Angel Pons560796c2020-04-03 01:22:52 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Piotr Króldcd2f172016-05-27 12:04:13 +02002
3/* Wake status package */
Felix Singerfa06bcb2022-12-26 09:32:47 +01004Name(WKST,Package(){0, 0})
Piotr Króldcd2f172016-05-27 12:04:13 +02005
6/*
7* \_PTS - Prepare to Sleep method
8*
9* Entry:
10* Arg0=The value of the sleeping state S1=1, S2=2, etc
11*
12* Exit:
13* -none-
14*
15* The _PTS control method is executed at the beginning of the sleep process
16* for S1-S5. The sleeping value is passed to the _PTS control method. This
17* control method may be executed a relatively long time before entering the
18* sleep state and the OS may abort the operation without notification to
19* the ACPI driver. This method cannot modify the configuration or power
20* state of any device in the system.
21*/
22
23External(\_SB.APTS, MethodObj)
24External(\_SB.AWAK, MethodObj)
25
26Method(_PTS, 1) {
27 /* DBGO("\\_PTS\n") */
28 /* DBGO("From S0 to S") */
29 /* DBGO(Arg0) */
30 /* DBGO("\n") */
31
32 /* Clear wake status structure. */
Elyes HAOUASc185cc62020-10-08 10:09:50 +020033 WKST [0] = 0
34 WKST [1] = 0
35 UPWS = 7
Piotr Króldcd2f172016-05-27 12:04:13 +020036 \_SB.APTS(Arg0)
37} /* End Method(\_PTS) */
38
39/*
Piotr Króldcd2f172016-05-27 12:04:13 +020040* \_WAK System Wake method
41*
42* Entry:
43* Arg0=The value of the sleeping state S1=1, S2=2
44*
45* Exit:
46* Return package of 2 DWords
47* Dword 1 - Status
48* 0x00000000 wake succeeded
49* 0x00000001 Wake was signaled but failed due to lack of power
50* 0x00000002 Wake was signaled but failed due to thermal condition
51* Dword 2 - Power Supply state
52* if non-zero the effective S-state the power supply entered
53*/
54Method(\_WAK, 1) {
55 /* DBGO("\\_WAK\n") */
56 /* DBGO("From S") */
57 /* DBGO(Arg0) */
58 /* DBGO(" to S0\n") */
59
60 /* clear USB wake up signal */
Elyes HAOUASc185cc62020-10-08 10:09:50 +020061 USBS = 1
Piotr Króldcd2f172016-05-27 12:04:13 +020062
63 \_SB.AWAK(Arg0)
64
65 Return(WKST)
66} /* End Method(\_WAK) */