Angel Pons | 3bd1e3d | 2020-04-05 15:47:17 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 2 | |
| 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"), |
Sumeet Pawnikar | 2ca76e6 | 2015-10-19 14:45:23 +0530 | [diff] [blame] | 18 | |
| 19 | #ifdef DPTF_ENABLE_FAN_CONTROL |
| 20 | /* DPPM Active Policy */ |
| 21 | ToUUID ("3A95C389-E4B8-4629-A526-C52C88626BAE"), |
| 22 | #endif |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 23 | }) |
| 24 | |
| 25 | Method (_STA) |
| 26 | { |
Elyes HAOUAS | fc29afb | 2020-10-09 15:05:28 +0200 | [diff] [blame^] | 27 | If (\DPTE == 1) { |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 28 | Return (0xF) |
| 29 | } Else { |
| 30 | Return (0x0) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | /* |
| 35 | * Arg0: Buffer containing UUID |
| 36 | * Arg1: Integer containing Revision ID of buffer format |
| 37 | * Arg2: Integer containing count of entries in Arg3 |
| 38 | * Arg3: Buffer containing list of DWORD capabilities |
| 39 | * Return: Buffer containing list of DWORD capabilities |
| 40 | */ |
| 41 | Method (_OSC, 4, Serialized) |
| 42 | { |
| 43 | /* Check for Passive Policy UUID */ |
Elyes HAOUAS | fc29afb | 2020-10-09 15:05:28 +0200 | [diff] [blame^] | 44 | If (DeRefOf (IDSP [0]) == Arg0) { |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 45 | /* Initialize Thermal Devices */ |
| 46 | ^TINI () |
| 47 | |
| 48 | #ifdef DPTF_ENABLE_CHARGER |
| 49 | /* Initialize Charger Device */ |
| 50 | ^TCHG.INIT () |
| 51 | #endif |
| 52 | } |
| 53 | |
| 54 | Return (Arg3) |
| 55 | } |
| 56 | |
| 57 | /* Priority based _TRT */ |
| 58 | Name (TRTR, 1) |
| 59 | |
| 60 | Method (_TRT) |
| 61 | { |
| 62 | Return (\_SB.DTRT) |
| 63 | } |
| 64 | |
Sumeet Pawnikar | 2ca76e6 | 2015-10-19 14:45:23 +0530 | [diff] [blame] | 65 | #ifdef DPTF_ENABLE_FAN_CONTROL |
| 66 | /* _ART : Active Cooling Relationship Table */ |
| 67 | Method (_ART) |
| 68 | { |
| 69 | Return (\_SB.DART) |
| 70 | } |
| 71 | #endif |
| 72 | |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 73 | /* Convert from Degrees C to 1/10 Kelvin for ACPI */ |
| 74 | Method (CTOK, 1) { |
| 75 | /* 10th of Degrees C */ |
Elyes HAOUAS | fc29afb | 2020-10-09 15:05:28 +0200 | [diff] [blame^] | 76 | Local0 = Arg0 * 10 |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 77 | |
| 78 | /* Convert to Kelvin */ |
Elyes HAOUAS | fc29afb | 2020-10-09 15:05:28 +0200 | [diff] [blame^] | 79 | Local0 += 2732 |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 80 | |
| 81 | Return (Local0) |
| 82 | } |
| 83 | |
| 84 | /* Include Thermal Participants */ |
| 85 | #include "thermal.asl" |
| 86 | |
| 87 | #ifdef DPTF_ENABLE_CHARGER |
| 88 | /* Include Charger Participant */ |
| 89 | #include "charger.asl" |
| 90 | #endif |
| 91 | |
Sumeet Pawnikar | 2ca76e6 | 2015-10-19 14:45:23 +0530 | [diff] [blame] | 92 | #ifdef DPTF_ENABLE_FAN_CONTROL |
| 93 | /* Include Fan Participant */ |
| 94 | #include "fan.asl" |
| 95 | #endif |
| 96 | |
Shilpa Sreeramalu | a0f5153 | 2015-06-22 21:48:39 +0530 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | Scope (\_SB.PCI0) |
| 100 | { |
| 101 | #include "cpu.asl" |
| 102 | } |