1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* Wake status package */
4 Name(WKST,Package(){Zero, Zero})
7 * \_PTS - Prepare to Sleep method
10 * Arg0=The value of the sleeping state S1=1, S2=2, etc
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.
23 /* DBGO("\\_PTS\n") */
24 /* DBGO("From S0 to S") */
28 /* Don't allow PCIRST# to reset USB */
33 /* Clear sleep SMI status flag and enable sleep SMI trap. */
37 /* On older chips, clear PciExpWakeDisEn */
38 /*if (\_SB.SBRI <= 0x13) {
43 /* Clear wake status structure. */
46 } /* End Method(\_PTS) */
49 * \_WAK System Wake method
52 * Arg0=The value of the sleeping state S1=1, S2=2
55 * Return package of 2 DWords
57 * 0x00000000 wake succeeded
58 * 0x00000001 Wake was signaled but failed due to lack of power
59 * 0x00000002 Wake was signaled but failed due to thermal condition
60 * Dword 2 - Power Supply state
61 * if non-zero the effective S-state the power supply entered
64 /* DBGO("\\_WAK\n") */
67 /* DBGO(" to S0\n") */
72 /* Restore PCIRST# so it resets USB */
77 /* Arbitrarily clear PciExpWakeStatus */
81 /* if (DeRefOf(WKST [0])) {
88 } /* End Method(\_WAK) */