| 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 |
// NVS has a flag to determine USB policy in S3 |
| 10 |
if (S3U0) { |
| 11 |
GP47 = 1 // Enable USB0 |
| 12 |
} Else { |
| 13 |
GP47 = 0 // Disable USB0 |
| 14 |
} |
| 15 |
|
| 16 |
// NVS has a flag to determine USB policy in S3 |
| 17 |
if (S3U1) { |
| 18 |
GP56 = 1 // Enable USB1 |
| 19 |
} Else { |
| 20 |
GP56 = 0 // Disable USB1 |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
/* The _WAK method is called on system wakeup */ |
| 25 |
|
| 26 |
Method(_WAK,1) |
| 27 |
{ |
| 28 |
Return(Package(){0,0}) |
| 29 |
} |