Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Martin Roth | ebabfad | 2016-04-10 11:09:16 -0600 | [diff] [blame] | 2 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 3 | Device (DPTF) |
| 4 | { |
| 5 | Name (_HID, EISAID ("INT3400")) |
| 6 | Name (_UID, 0) |
| 7 | |
| 8 | Name (IDSP, Package() |
| 9 | { |
| 10 | /* DPPM Passive Policy 1.0 */ |
| 11 | ToUUID ("42A441D6-AE6A-462B-A84B-4A8CE79027D3"), |
| 12 | |
| 13 | /* DPPM Critical Policy */ |
| 14 | ToUUID ("97C68AE7-15FA-499c-B8C9-5DA81D606E0A"), |
| 15 | |
| 16 | /* DPPM Cooling Policy */ |
| 17 | ToUUID ("16CAF1B7-DD38-40ED-B1C1-1B8A1913D531"), |
| 18 | }) |
| 19 | |
| 20 | Method (_STA) |
| 21 | { |
Felix Singer | 7b8ac00 | 2022-12-26 08:45:56 +0100 | [diff] [blame^] | 22 | If (\DPTE == 1) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 23 | Return (0xF) |
| 24 | } Else { |
| 25 | Return (0x0) |
| 26 | } |
| 27 | } |
| 28 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 29 | /* |
| 30 | * Arg0: Buffer containing UUID |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 31 | * Arg1: Integer containing Revision ID of buffer format |
| 32 | * Arg2: Integer containing count of entries in Arg3 |
| 33 | * Arg3: Buffer containing list of DWORD capabilities |
| 34 | * Return: Buffer containing list of DWORD capabilities |
| 35 | */ |
| 36 | Method (_OSC, 4, Serialized) |
| 37 | { |
| 38 | /* Check for Passive Policy UUID */ |
Elyes Haouas | ffc0d24 | 2022-12-25 06:01:09 +0100 | [diff] [blame] | 39 | If (DeRefOf (IDSP[0]) == Arg0) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 40 | /* Initialize Thermal Devices */ |
| 41 | ^TINI () |
| 42 | |
| 43 | #ifdef DPTF_ENABLE_CHARGER |
| 44 | /* Initialize Charger Device */ |
| 45 | ^TCHG.INIT () |
| 46 | #endif |
| 47 | } |
| 48 | |
| 49 | Return (Arg3) |
| 50 | } |
| 51 | |
| 52 | /* Priority based _TRT */ |
| 53 | Name (TRTR, 1) |
| 54 | |
| 55 | Method (_TRT) |
| 56 | { |
| 57 | Return (\_SB.DTRT) |
| 58 | } |
| 59 | |
| 60 | /* Convert from Degrees C to 1/10 Kelvin for ACPI */ |
| 61 | Method (CTOK, 1) { |
| 62 | /* 10th of Degrees C */ |
Felix Singer | 447c399 | 2022-12-12 01:36:53 +0100 | [diff] [blame] | 63 | Local0 = Arg0 * 10 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 64 | |
| 65 | /* Convert to Kelvin */ |
Felix Singer | e4c3004 | 2022-12-12 00:46:05 +0100 | [diff] [blame] | 66 | Local0 += 2732 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 67 | |
| 68 | Return (Local0) |
| 69 | } |
| 70 | |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 71 | /* Include Thermal Participants */ |
| 72 | #include "thermal.asl" |
| 73 | |
| 74 | #ifdef DPTF_ENABLE_CHARGER |
| 75 | /* Include Charger Participant */ |
| 76 | #include "charger.asl" |
| 77 | #endif |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 78 | |
Prince Agyeman | 4aab85b | 2015-08-05 20:17:38 -0700 | [diff] [blame] | 79 | /* Include Network Participants */ |
| 80 | #ifdef DPTF_ENABLE_WIFI |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 81 | #include "wifi.asl" |
Prince Agyeman | 4aab85b | 2015-08-05 20:17:38 -0700 | [diff] [blame] | 82 | #endif |
| 83 | |
| 84 | #ifdef DPTF_ENABLE_WWAN |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 85 | #include "wwan.asl" |
Prince Agyeman | 4aab85b | 2015-08-05 20:17:38 -0700 | [diff] [blame] | 86 | #endif |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 87 | } |