blob: 0c7541a635e88c480e57ef1351eca37ff82c015c [file] [log] [blame]
Angel Pons5c596802020-04-03 01:21:01 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Richard Spiegel31d04e62019-07-02 17:13:19 -07002
3/* Wake status package */
Felix Singerfa06bcb2022-12-26 09:32:47 +01004Name(WKST,Package(){0, 0})
Richard Spiegel31d04e62019-07-02 17:13:19 -07005
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*/
22Method(_PTS, 1) {
23 /* DBGO("\\_PTS\n") */
24 /* DBGO("From S0 to S") */
25 /* DBGO(Arg0) */
26 /* DBGO("\n") */
27
28 /* Clear wake status structure. */
Elyes HAOUAS85a20262020-10-08 09:06:04 +020029 PEWD = 0
30 WKST [0] = 0
31 WKST [1] = 0
32 UPWS = 7
Richard Spiegel31d04e62019-07-02 17:13:19 -070033} /* End Method(\_PTS) */
34
35/*
Richard Spiegel31d04e62019-07-02 17:13:19 -070036* \_WAK System Wake method
37*
38* Entry:
39* Arg0=The value of the sleeping state S1=1, S2=2
40*
41* Exit:
42* Return package of 2 DWords
43* Dword 1 - Status
44* 0x00000000 wake succeeded
45* 0x00000001 Wake was signaled but failed due to lack of power
46* 0x00000002 Wake was signaled but failed due to thermal condition
47* Dword 2 - Power Supply state
48* if non-zero the effective S-state the power supply entered
49*/
50Method(\_WAK, 1) {
51 /* DBGO("\\_WAK\n") */
52 /* DBGO("From S") */
53 /* DBGO(Arg0) */
54 /* DBGO(" to S0\n") */
55
56 Return(WKST)
57} /* End Method(\_WAK) */