1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2014 Google Inc. 4 * Copyright (C) 2016 Intel Corporation. 5 */ 6 7Device (DPTF) 8{ 9 Name (_HID, EISAID ("INT3400")) 10 Name (_UID, 0) 11 12 Name (IDSP, Package() 13 { 14 /* DPPM Passive Policy 1.0 */ 15 ToUUID ("42A441D6-AE6A-462B-A84B-4A8CE79027D3"), 16 17 /* DPPM Critical Policy */ 18 ToUUID ("97C68AE7-15FA-499c-B8C9-5DA81D606E0A"), 19 20 /* DPPM Cooling Policy */ 21 ToUUID ("16CAF1B7-DD38-40ED-B1C1-1B8A1913D531"), 22 23#ifdef DPTF_ENABLE_FAN_CONTROL 24 /* DPPM Active Policy */ 25 ToUUID ("3A95C389-E4B8-4629-A526-C52C88626BAE"), 26#endif 27 }) 28 29 Method (_STA) 30 { 31 If (LEqual (\DPTE, One)) { 32 Return (0xF) 33 } Else { 34 Return (0x0) 35 } 36 } 37 38 /* 39 * Arg0: Buffer containing UUID 40 * Arg1: Integer containing Revision ID of buffer format 41 * Arg2: Integer containing count of entries in Arg3 42 * Arg3: Buffer containing list of DWORD capabilities 43 * Return: Buffer containing list of DWORD capabilities 44 */ 45 Method (_OSC, 4, Serialized) 46 { 47 /* Check for Passive Policy UUID */ 48 If (LEqual (DeRefOf (Index (IDSP, 0)), Arg0)) { 49 /* Initialize Thermal Devices */ 50 ^TINI () 51 52#ifdef DPTF_ENABLE_CHARGER 53 /* Initialize Charger Device */ 54 ^TCHG.INIT () 55#endif 56 } 57 58 Return (Arg3) 59 } 60 61 /* Priority based _TRT */ 62 Name (TRTR, 1) 63 64 Method (_TRT) 65 { 66 Return (\_SB.DTRT) 67 } 68 69#ifdef DPTF_ENABLE_FAN_CONTROL 70 /* _ART : Active Cooling Relationship Table */ 71 Method (_ART) 72 { 73 Return (\_SB.DART) 74 } 75#endif 76 77 /* Convert from Degrees C to 1/10 Kelvin for ACPI */ 78 Method (CTOK, 1) { 79 /* 10th of Degrees C */ 80 Multiply (Arg0, 10, Local0) 81 82 /* Convert to Kelvin */ 83 Add (Local0, 2732, Local0) 84 85 Return (Local0) 86 } 87 88 /* Convert from 1/10 Kelvin to Degrees C for ACPI */ 89 Method (KTOC, 1) { 90 If (LLessEqual (Arg0, 2732)) { 91 Return (0) 92 } 93 94 /* Convert to Celsius */ 95 Subtract (Arg0, 2732, Local0) 96 97 /* Convert from 10th of degrees */ 98 Divide (Local0, 10,, Local0) 99 100 Return (Local0) 101 } 102 103 /* Include Thermal Participants */ 104 #include "thermal.asl" 105 106#ifdef DPTF_ENABLE_CHARGER 107 /* Include Charger Participant */ 108 #include "charger.asl" 109#endif 110 111#ifdef DPTF_ENABLE_FAN_CONTROL 112 /* Include Fan Participant */ 113 #include "fan.asl" 114#endif 115 116} 117 118Scope (\_SB.PCI0) 119{ 120 #include "cpu.asl" 121} 122