| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
|
| 3 |
// Thermal Zone |
| 4 |
|
| 5 |
External (\PPKG, MethodObj) |
| 6 |
|
| 7 |
#define HAVE_THERMALZONE |
| 8 |
Scope (\_TZ) |
| 9 |
{ |
| 10 |
ThermalZone (THRM) |
| 11 |
{ |
| 12 |
Name (_TC1, 0x02) |
| 13 |
Name (_TC2, 0x05) |
| 14 |
|
| 15 |
// Thermal zone polling frequency: 10 seconds |
| 16 |
Name (_TZP, 100) |
| 17 |
|
| 18 |
// Thermal sampling period for passive cooling: 2 seconds |
| 19 |
Name (_TSP, 20) |
| 20 |
|
| 21 |
// Convert from Degrees C to 1/10 Kelvin for ACPI |
| 22 |
Method (CTOK, 1) { |
| 23 |
// 10th of Degrees C |
| 24 |
Local0 = Arg0 * 10 |
| 25 |
|
| 26 |
// Convert to Kelvin |
| 27 |
Local0 += 2732 |
| 28 |
|
| 29 |
Return (Local0) |
| 30 |
} |
| 31 |
|
| 32 |
// Threshold for OS to shutdown |
| 33 |
Method (_CRT, 0, Serialized) |
| 34 |
{ |
| 35 |
Return (CTOK (\TCRT)) |
| 36 |
} |
| 37 |
|
| 38 |
// Threshold for passive cooling |
| 39 |
Method (_PSV, 0, Serialized) |
| 40 |
{ |
| 41 |
Return (CTOK (\TPSV)) |
| 42 |
} |
| 43 |
|
| 44 |
// Processors used for passive cooling |
| 45 |
Method (_PSL, 0, Serialized) |
| 46 |
{ |
| 47 |
Return (\PPKG ()) |
| 48 |
} |
| 49 |
|
| 50 |
Method (_TMP, 0, Serialized) |
| 51 |
{ |
| 52 |
// Get CPU Temperature from EC |
| 53 |
Local0 = \_SB.PCI0.LPCB.EC0.CTMP |
| 54 |
|
| 55 |
// Convert to 1/10 Kelvin |
| 56 |
Local0 *= 10 |
| 57 |
|
| 58 |
// Adjust by offset to get Kelvin |
| 59 |
Local0 += 2732 |
| 60 |
|
| 61 |
Return (Local0) |
| 62 |
} |
| 63 |
|
| 64 |
// The EC does all fan control. There is no Active Cooling Fan control (_ACx). |
| 65 |
} |
| 66 |
} |