| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Windfarm PowerMac thermal control. iMac G5 iSight |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Bits & pieces from windfarm_pm81.c by (c) Copyright 2005 Benjamin |
|---|
| 7 | 8 | * Herrenschmidt, IBM Corp. <benh@kernel.crashing.org> |
|---|
| 8 | 9 | * |
|---|
| 9 | | - * Released under the term of the GNU GPL v2. |
|---|
| 10 | | - * |
|---|
| 11 | | - * |
|---|
| 12 | | - * |
|---|
| 13 | 10 | * PowerMac12,1 |
|---|
| 14 | 11 | * ============ |
|---|
| 15 | | - * |
|---|
| 16 | 12 | * |
|---|
| 17 | 13 | * The algorithm used is the PID control algorithm, used the same way |
|---|
| 18 | 14 | * the published Darwin code does, using the same values that are |
|---|
| .. | .. |
|---|
| 24 | 20 | * 17" while Model 3 is iMac G5 20". They do have both the same |
|---|
| 25 | 21 | * controls with a tiny difference. The control-ids of hard-drive-fan |
|---|
| 26 | 22 | * and cpu-fan is swapped. |
|---|
| 27 | | - * |
|---|
| 28 | 23 | * |
|---|
| 29 | 24 | * Target Correction : |
|---|
| 30 | 25 | * |
|---|
| .. | .. |
|---|
| 63 | 58 | * offset : -15650652 |
|---|
| 64 | 59 | * slope : 1565065 |
|---|
| 65 | 60 | * |
|---|
| 66 | | - * |
|---|
| 67 | 61 | * Target rubber-banding : |
|---|
| 68 | 62 | * |
|---|
| 69 | 63 | * Some controls have a target correction which depends on another |
|---|
| .. | .. |
|---|
| 75 | 69 | * greater than 0, then we correct the target value using : |
|---|
| 76 | 70 | * |
|---|
| 77 | 71 | * new_target = max (new_target, new_min >> 16) |
|---|
| 78 | | - * |
|---|
| 79 | 72 | * |
|---|
| 80 | 73 | * # model_id : 2 |
|---|
| 81 | 74 | * control : cpu-fan |
|---|
| .. | .. |
|---|
| 89 | 82 | * offset : -32768000 |
|---|
| 90 | 83 | * slope : 65536 |
|---|
| 91 | 84 | * |
|---|
| 92 | | - * |
|---|
| 93 | 85 | * In order to have the moste efficient correction with those |
|---|
| 94 | 86 | * dependencies, we must trigger HD loop before OD loop before CPU |
|---|
| 95 | 87 | * loop. |
|---|
| 96 | | - * |
|---|
| 97 | 88 | * |
|---|
| 98 | 89 | * The various control loops found in Darwin config file are: |
|---|
| 99 | 90 | * |
|---|
| .. | .. |
|---|
| 191 | 182 | * sensors : cpu-temp, cpu-power |
|---|
| 192 | 183 | * PID params : from SDB partition |
|---|
| 193 | 184 | * |
|---|
| 194 | | - * |
|---|
| 195 | 185 | * CPU Slew control loop. |
|---|
| 196 | 186 | * |
|---|
| 197 | 187 | * control : cpufreq-clamp |
|---|
| 198 | 188 | * sensor : cpu-temp |
|---|
| 199 | | - * |
|---|
| 200 | 189 | */ |
|---|
| 201 | 190 | |
|---|
| 202 | 191 | #undef DEBUG |
|---|