1 // SPDX-License-Identifier: GPL-2.0-only
3 * Windfarm PowerMac thermal control.
4 * Control loops for PowerMac7,2 and 7,3
6 * Copyright (C) 2012 Benjamin Herrenschmidt, IBM Corp.
8 #include <linux/types.h>
9 #include <linux/errno.h>
10 #include <linux/kernel.h>
11 #include <linux/device.h>
12 #include <linux/platform_device.h>
13 #include <linux/reboot.h>
18 #include "windfarm_pid.h"
19 #include "windfarm_mpu.h"
27 #define DBG(args...) printk(args)
29 #define DBG(args...) do { } while(0)
33 #define DBG_LOTS(args...) printk(args)
35 #define DBG_LOTS(args...) do { } while(0)
38 /* define this to force CPU overtemp to 60 degree, useful for testing
41 #undef HACKED_OVERTEMP
43 /* We currently only handle 2 chips */
45 #define NR_CPU_FANS 3 * NR_CHIPS
47 /* Controls and sensors */
48 static struct wf_sensor
*sens_cpu_temp
[NR_CHIPS
];
49 static struct wf_sensor
*sens_cpu_volts
[NR_CHIPS
];
50 static struct wf_sensor
*sens_cpu_amps
[NR_CHIPS
];
51 static struct wf_sensor
*backside_temp
;
52 static struct wf_sensor
*drives_temp
;
54 static struct wf_control
*cpu_front_fans
[NR_CHIPS
];
55 static struct wf_control
*cpu_rear_fans
[NR_CHIPS
];
56 static struct wf_control
*cpu_pumps
[NR_CHIPS
];
57 static struct wf_control
*backside_fan
;
58 static struct wf_control
*drives_fan
;
59 static struct wf_control
*slots_fan
;
60 static struct wf_control
*cpufreq_clamp
;
62 /* We keep a temperature history for average calculation of 180s */
63 #define CPU_TEMP_HIST_SIZE 180
65 /* Fixed speed for slot fan */
66 #define SLOTS_FAN_DEFAULT_PWM 40
68 /* Scale value for CPU intake fans */
69 #define CPU_INTAKE_SCALE 0x0000f852
72 static const struct mpu_data
*cpu_mpu_data
[NR_CHIPS
];
73 static struct wf_cpu_pid_state cpu_pid
[NR_CHIPS
];
74 static bool cpu_pid_combined
;
75 static u32 cpu_thist
[CPU_TEMP_HIST_SIZE
];
76 static int cpu_thist_pt
;
77 static s64 cpu_thist_total
;
78 static s32 cpu_all_tmax
= 100 << 16;
79 static struct wf_pid_state backside_pid
;
80 static int backside_tick
;
81 static struct wf_pid_state drives_pid
;
82 static int drives_tick
;
85 static bool have_all_controls
;
86 static bool have_all_sensors
;
89 static int failure_state
;
90 #define FAILURE_SENSOR 1
92 #define FAILURE_PERM 4
93 #define FAILURE_LOW_OVERTEMP 8
94 #define FAILURE_HIGH_OVERTEMP 16
97 #define LOW_OVER_AVERAGE 0
98 #define LOW_OVER_IMMEDIATE (10 << 16)
99 #define LOW_OVER_CLEAR ((-10) << 16)
100 #define HIGH_OVER_IMMEDIATE (14 << 16)
101 #define HIGH_OVER_AVERAGE (10 << 16)
102 #define HIGH_OVER_IMMEDIATE (14 << 16)
105 static void cpu_max_all_fans(void)
109 /* We max all CPU fans in case of a sensor error. We also do the
110 * cpufreq clamping now, even if it's supposedly done later by the
111 * generic code anyway, we do it earlier here to react faster
114 wf_control_set_max(cpufreq_clamp
);
115 for (i
= 0; i
< nr_chips
; i
++) {
116 if (cpu_front_fans
[i
])
117 wf_control_set_max(cpu_front_fans
[i
]);
118 if (cpu_rear_fans
[i
])
119 wf_control_set_max(cpu_rear_fans
[i
]);
121 wf_control_set_max(cpu_pumps
[i
]);
125 static int cpu_check_overtemp(s32 temp
)
129 static bool first
= true;
131 /* First check for immediate overtemps */
132 if (temp
>= (cpu_all_tmax
+ LOW_OVER_IMMEDIATE
)) {
133 new_state
|= FAILURE_LOW_OVERTEMP
;
134 if ((failure_state
& FAILURE_LOW_OVERTEMP
) == 0)
135 printk(KERN_ERR
"windfarm: Overtemp due to immediate CPU"
138 if (temp
>= (cpu_all_tmax
+ HIGH_OVER_IMMEDIATE
)) {
139 new_state
|= FAILURE_HIGH_OVERTEMP
;
140 if ((failure_state
& FAILURE_HIGH_OVERTEMP
) == 0)
141 printk(KERN_ERR
"windfarm: Critical overtemp due to"
142 " immediate CPU temperature !\n");
146 * The first time around, initialize the array with the first
147 * temperature reading
153 for (i
= 0; i
< CPU_TEMP_HIST_SIZE
; i
++) {
155 cpu_thist_total
+= temp
;
161 * We calculate a history of max temperatures and use that for the
162 * overtemp management
164 t_old
= cpu_thist
[cpu_thist_pt
];
165 cpu_thist
[cpu_thist_pt
] = temp
;
166 cpu_thist_pt
= (cpu_thist_pt
+ 1) % CPU_TEMP_HIST_SIZE
;
167 cpu_thist_total
-= t_old
;
168 cpu_thist_total
+= temp
;
169 t_avg
= cpu_thist_total
/ CPU_TEMP_HIST_SIZE
;
171 DBG_LOTS(" t_avg = %d.%03d (out: %d.%03d, in: %d.%03d)\n",
172 FIX32TOPRINT(t_avg
), FIX32TOPRINT(t_old
), FIX32TOPRINT(temp
));
174 /* Now check for average overtemps */
175 if (t_avg
>= (cpu_all_tmax
+ LOW_OVER_AVERAGE
)) {
176 new_state
|= FAILURE_LOW_OVERTEMP
;
177 if ((failure_state
& FAILURE_LOW_OVERTEMP
) == 0)
178 printk(KERN_ERR
"windfarm: Overtemp due to average CPU"
181 if (t_avg
>= (cpu_all_tmax
+ HIGH_OVER_AVERAGE
)) {
182 new_state
|= FAILURE_HIGH_OVERTEMP
;
183 if ((failure_state
& FAILURE_HIGH_OVERTEMP
) == 0)
184 printk(KERN_ERR
"windfarm: Critical overtemp due to"
185 " average CPU temperature !\n");
188 /* Now handle overtemp conditions. We don't currently use the windfarm
189 * overtemp handling core as it's not fully suited to the needs of those
190 * new machine. This will be fixed later.
193 /* High overtemp -> immediate shutdown */
194 if (new_state
& FAILURE_HIGH_OVERTEMP
)
196 if ((failure_state
& new_state
) != new_state
)
198 failure_state
|= new_state
;
199 } else if ((failure_state
& FAILURE_LOW_OVERTEMP
) &&
200 (temp
< (cpu_all_tmax
+ LOW_OVER_CLEAR
))) {
201 printk(KERN_ERR
"windfarm: Overtemp condition cleared !\n");
202 failure_state
&= ~FAILURE_LOW_OVERTEMP
;
205 return failure_state
& (FAILURE_LOW_OVERTEMP
| FAILURE_HIGH_OVERTEMP
);
208 static int read_one_cpu_vals(int cpu
, s32
*temp
, s32
*power
)
210 s32 dtemp
, volts
, amps
;
213 /* Get diode temperature */
214 rc
= wf_sensor_get(sens_cpu_temp
[cpu
], &dtemp
);
216 DBG(" CPU%d: temp reading error !\n", cpu
);
219 DBG_LOTS(" CPU%d: temp = %d.%03d\n", cpu
, FIX32TOPRINT((dtemp
)));
223 rc
= wf_sensor_get(sens_cpu_volts
[cpu
], &volts
);
225 DBG(" CPU%d, volts reading error !\n", cpu
);
228 DBG_LOTS(" CPU%d: volts = %d.%03d\n", cpu
, FIX32TOPRINT((volts
)));
231 rc
= wf_sensor_get(sens_cpu_amps
[cpu
], &s
);
233 DBG(" CPU%d, current reading error !\n", cpu
);
236 DBG_LOTS(" CPU%d: amps = %d.%03d\n", cpu
, FIX32TOPRINT((amps
)));
238 /* Calculate power */
240 /* Scale voltage and current raw sensor values according to fixed scales
241 * obtained in Darwin and calculate power from I and V
243 *power
= (((u64
)volts
) * ((u64
)amps
)) >> 16;
245 DBG_LOTS(" CPU%d: power = %d.%03d\n", cpu
, FIX32TOPRINT((*power
)));
251 static void cpu_fans_tick_split(void)
254 s32 intake
, temp
, power
, t_max
= 0;
256 DBG_LOTS("* cpu fans_tick_split()\n");
258 for (cpu
= 0; cpu
< nr_chips
; ++cpu
) {
259 struct wf_cpu_pid_state
*sp
= &cpu_pid
[cpu
];
261 /* Read current speed */
262 wf_control_get(cpu_rear_fans
[cpu
], &sp
->target
);
264 DBG_LOTS(" CPU%d: cur_target = %d RPM\n", cpu
, sp
->target
);
266 err
= read_one_cpu_vals(cpu
, &temp
, &power
);
268 failure_state
|= FAILURE_SENSOR
;
273 /* Keep track of highest temp */
274 t_max
= max(t_max
, temp
);
276 /* Handle possible overtemps */
277 if (cpu_check_overtemp(t_max
))
281 wf_cpu_pid_run(sp
, power
, temp
);
283 DBG_LOTS(" CPU%d: target = %d RPM\n", cpu
, sp
->target
);
285 /* Apply result directly to exhaust fan */
286 err
= wf_control_set(cpu_rear_fans
[cpu
], sp
->target
);
288 pr_warn("wf_pm72: Fan %s reports error %d\n",
289 cpu_rear_fans
[cpu
]->name
, err
);
290 failure_state
|= FAILURE_FAN
;
294 /* Scale result for intake fan */
295 intake
= (sp
->target
* CPU_INTAKE_SCALE
) >> 16;
296 DBG_LOTS(" CPU%d: intake = %d RPM\n", cpu
, intake
);
297 err
= wf_control_set(cpu_front_fans
[cpu
], intake
);
299 pr_warn("wf_pm72: Fan %s reports error %d\n",
300 cpu_front_fans
[cpu
]->name
, err
);
301 failure_state
|= FAILURE_FAN
;
307 static void cpu_fans_tick_combined(void)
309 s32 temp0
, power0
, temp1
, power1
, t_max
= 0;
310 s32 temp
, power
, intake
, pump
;
311 struct wf_control
*pump0
, *pump1
;
312 struct wf_cpu_pid_state
*sp
= &cpu_pid
[0];
315 DBG_LOTS("* cpu fans_tick_combined()\n");
317 /* Read current speed from cpu 0 */
318 wf_control_get(cpu_rear_fans
[0], &sp
->target
);
320 DBG_LOTS(" CPUs: cur_target = %d RPM\n", sp
->target
);
322 /* Read values for both CPUs */
323 err
= read_one_cpu_vals(0, &temp0
, &power0
);
325 failure_state
|= FAILURE_SENSOR
;
329 err
= read_one_cpu_vals(1, &temp1
, &power1
);
331 failure_state
|= FAILURE_SENSOR
;
336 /* Keep track of highest temp */
337 t_max
= max(t_max
, max(temp0
, temp1
));
339 /* Handle possible overtemps */
340 if (cpu_check_overtemp(t_max
))
343 /* Use the max temp & power of both */
344 temp
= max(temp0
, temp1
);
345 power
= max(power0
, power1
);
348 wf_cpu_pid_run(sp
, power
, temp
);
350 /* Scale result for intake fan */
351 intake
= (sp
->target
* CPU_INTAKE_SCALE
) >> 16;
353 /* Same deal with pump speed */
354 pump0
= cpu_pumps
[0];
355 pump1
= cpu_pumps
[1];
360 pump
= (sp
->target
* wf_control_get_max(pump0
)) /
361 cpu_mpu_data
[0]->rmaxn_exhaust_fan
;
363 DBG_LOTS(" CPUs: target = %d RPM\n", sp
->target
);
364 DBG_LOTS(" CPUs: intake = %d RPM\n", intake
);
365 DBG_LOTS(" CPUs: pump = %d RPM\n", pump
);
367 for (cpu
= 0; cpu
< nr_chips
; cpu
++) {
368 err
= wf_control_set(cpu_rear_fans
[cpu
], sp
->target
);
370 pr_warn("wf_pm72: Fan %s reports error %d\n",
371 cpu_rear_fans
[cpu
]->name
, err
);
372 failure_state
|= FAILURE_FAN
;
374 err
= wf_control_set(cpu_front_fans
[cpu
], intake
);
376 pr_warn("wf_pm72: Fan %s reports error %d\n",
377 cpu_front_fans
[cpu
]->name
, err
);
378 failure_state
|= FAILURE_FAN
;
382 err
= wf_control_set(cpu_pumps
[cpu
], pump
);
384 pr_warn("wf_pm72: Pump %s reports error %d\n",
385 cpu_pumps
[cpu
]->name
, err
);
386 failure_state
|= FAILURE_FAN
;
391 /* Implementation... */
392 static int cpu_setup_pid(int cpu
)
394 struct wf_cpu_pid_param pid
;
395 const struct mpu_data
*mpu
= cpu_mpu_data
[cpu
];
396 s32 tmax
, ttarget
, ptarget
;
397 int fmin
, fmax
, hsize
;
399 /* Get PID params from the appropriate MPU EEPROM */
400 tmax
= mpu
->tmax
<< 16;
401 ttarget
= mpu
->ttarget
<< 16;
402 ptarget
= ((s32
)(mpu
->pmaxh
- mpu
->padjmax
)) << 16;
404 DBG("wf_72: CPU%d ttarget = %d.%03d, tmax = %d.%03d\n",
405 cpu
, FIX32TOPRINT(ttarget
), FIX32TOPRINT(tmax
));
407 /* We keep a global tmax for overtemp calculations */
408 if (tmax
< cpu_all_tmax
)
411 /* Set PID min/max by using the rear fan min/max */
412 fmin
= wf_control_get_min(cpu_rear_fans
[cpu
]);
413 fmax
= wf_control_get_max(cpu_rear_fans
[cpu
]);
414 DBG("wf_72: CPU%d max RPM range = [%d..%d]\n", cpu
, fmin
, fmax
);
417 hsize
= min_t(int, mpu
->tguardband
, WF_PID_MAX_HISTORY
);
418 DBG("wf_72: CPU%d history size = %d\n", cpu
, hsize
);
420 /* Initialize PID loop */
421 pid
.interval
= 1; /* seconds */
422 pid
.history_len
= hsize
;
423 pid
.gd
= mpu
->pid_gd
;
424 pid
.gp
= mpu
->pid_gp
;
425 pid
.gr
= mpu
->pid_gr
;
427 pid
.ttarget
= ttarget
;
428 pid
.pmaxadj
= ptarget
;
432 wf_cpu_pid_init(&cpu_pid
[cpu
], &pid
);
433 cpu_pid
[cpu
].target
= 1000;
438 /* Backside/U3 fan */
439 static struct wf_pid_param backside_u3_param
= {
451 static struct wf_pid_param backside_u3h_param
= {
463 static void backside_fan_tick(void)
469 if (!backside_fan
|| !backside_temp
|| !backside_tick
)
471 if (--backside_tick
> 0)
473 backside_tick
= backside_pid
.param
.interval
;
475 DBG_LOTS("* backside fans tick\n");
477 /* Update fan speed from actual fans */
478 err
= wf_control_get(backside_fan
, &speed
);
480 backside_pid
.target
= speed
;
482 err
= wf_sensor_get(backside_temp
, &temp
);
484 printk(KERN_WARNING
"windfarm: U4 temp sensor error %d\n",
486 failure_state
|= FAILURE_SENSOR
;
487 wf_control_set_max(backside_fan
);
490 speed
= wf_pid_run(&backside_pid
, temp
);
492 DBG_LOTS("backside PID temp=%d.%.3d speed=%d\n",
493 FIX32TOPRINT(temp
), speed
);
495 err
= wf_control_set(backside_fan
, speed
);
497 printk(KERN_WARNING
"windfarm: backside fan error %d\n", err
);
498 failure_state
|= FAILURE_FAN
;
502 static void backside_setup_pid(void)
504 /* first time initialize things */
505 s32 fmin
= wf_control_get_min(backside_fan
);
506 s32 fmax
= wf_control_get_max(backside_fan
);
507 struct wf_pid_param param
;
508 struct device_node
*u3
;
509 int u3h
= 1; /* conservative by default */
511 u3
= of_find_node_by_path("/u3@0,f8000000");
513 const u32
*vers
= of_get_property(u3
, "device-rev", NULL
);
515 if (((*vers
) & 0x3f) < 0x34)
520 param
= u3h
? backside_u3h_param
: backside_u3_param
;
522 param
.min
= max(param
.min
, fmin
);
523 param
.max
= min(param
.max
, fmax
);
524 wf_pid_init(&backside_pid
, ¶m
);
527 pr_info("wf_pm72: Backside control loop started.\n");
531 static const struct wf_pid_param drives_param
= {
543 static void drives_fan_tick(void)
549 if (!drives_fan
|| !drives_temp
|| !drives_tick
)
551 if (--drives_tick
> 0)
553 drives_tick
= drives_pid
.param
.interval
;
555 DBG_LOTS("* drives fans tick\n");
557 /* Update fan speed from actual fans */
558 err
= wf_control_get(drives_fan
, &speed
);
560 drives_pid
.target
= speed
;
562 err
= wf_sensor_get(drives_temp
, &temp
);
564 pr_warn("wf_pm72: drive bay temp sensor error %d\n", err
);
565 failure_state
|= FAILURE_SENSOR
;
566 wf_control_set_max(drives_fan
);
569 speed
= wf_pid_run(&drives_pid
, temp
);
571 DBG_LOTS("drives PID temp=%d.%.3d speed=%d\n",
572 FIX32TOPRINT(temp
), speed
);
574 err
= wf_control_set(drives_fan
, speed
);
576 printk(KERN_WARNING
"windfarm: drive bay fan error %d\n", err
);
577 failure_state
|= FAILURE_FAN
;
581 static void drives_setup_pid(void)
583 /* first time initialize things */
584 s32 fmin
= wf_control_get_min(drives_fan
);
585 s32 fmax
= wf_control_get_max(drives_fan
);
586 struct wf_pid_param param
= drives_param
;
588 param
.min
= max(param
.min
, fmin
);
589 param
.max
= min(param
.max
, fmax
);
590 wf_pid_init(&drives_pid
, ¶m
);
593 pr_info("wf_pm72: Drive bay control loop started.\n");
596 static void set_fail_state(void)
601 wf_control_set_max(backside_fan
);
603 wf_control_set_max(slots_fan
);
605 wf_control_set_max(drives_fan
);
608 static void pm72_tick(void)
614 printk(KERN_INFO
"windfarm: CPUs control loops started.\n");
615 for (i
= 0; i
< nr_chips
; ++i
) {
616 if (cpu_setup_pid(i
) < 0) {
617 failure_state
= FAILURE_PERM
;
622 DBG_LOTS("cpu_all_tmax=%d.%03d\n", FIX32TOPRINT(cpu_all_tmax
));
624 backside_setup_pid();
628 * We don't have the right stuff to drive the PCI fan
629 * so we fix it to a default value
631 wf_control_set(slots_fan
, SLOTS_FAN_DEFAULT_PWM
);
633 #ifdef HACKED_OVERTEMP
634 cpu_all_tmax
= 60 << 16;
638 /* Permanent failure, bail out */
639 if (failure_state
& FAILURE_PERM
)
643 * Clear all failure bits except low overtemp which will be eventually
644 * cleared by the control loop itself
646 last_failure
= failure_state
;
647 failure_state
&= FAILURE_LOW_OVERTEMP
;
648 if (cpu_pid_combined
)
649 cpu_fans_tick_combined();
651 cpu_fans_tick_split();
655 DBG_LOTS(" last_failure: 0x%x, failure_state: %x\n",
656 last_failure
, failure_state
);
658 /* Check for failures. Any failure causes cpufreq clamping */
659 if (failure_state
&& last_failure
== 0 && cpufreq_clamp
)
660 wf_control_set_max(cpufreq_clamp
);
661 if (failure_state
== 0 && last_failure
&& cpufreq_clamp
)
662 wf_control_set_min(cpufreq_clamp
);
664 /* That's it for now, we might want to deal with other failures
665 * differently in the future though
669 static void pm72_new_control(struct wf_control
*ct
)
672 bool had_pump
= cpu_pumps
[0] || cpu_pumps
[1];
674 if (!strcmp(ct
->name
, "cpu-front-fan-0"))
675 cpu_front_fans
[0] = ct
;
676 else if (!strcmp(ct
->name
, "cpu-front-fan-1"))
677 cpu_front_fans
[1] = ct
;
678 else if (!strcmp(ct
->name
, "cpu-rear-fan-0"))
679 cpu_rear_fans
[0] = ct
;
680 else if (!strcmp(ct
->name
, "cpu-rear-fan-1"))
681 cpu_rear_fans
[1] = ct
;
682 else if (!strcmp(ct
->name
, "cpu-pump-0"))
684 else if (!strcmp(ct
->name
, "cpu-pump-1"))
686 else if (!strcmp(ct
->name
, "backside-fan"))
688 else if (!strcmp(ct
->name
, "slots-fan"))
690 else if (!strcmp(ct
->name
, "drive-bay-fan"))
692 else if (!strcmp(ct
->name
, "cpufreq-clamp"))
705 have_all_controls
= all_controls
;
707 if ((cpu_pumps
[0] || cpu_pumps
[1]) && !had_pump
) {
708 pr_info("wf_pm72: Liquid cooling pump(s) detected,"
709 " using new algorithm !\n");
710 cpu_pid_combined
= true;
715 static void pm72_new_sensor(struct wf_sensor
*sr
)
719 if (!strcmp(sr
->name
, "cpu-diode-temp-0"))
720 sens_cpu_temp
[0] = sr
;
721 else if (!strcmp(sr
->name
, "cpu-diode-temp-1"))
722 sens_cpu_temp
[1] = sr
;
723 else if (!strcmp(sr
->name
, "cpu-voltage-0"))
724 sens_cpu_volts
[0] = sr
;
725 else if (!strcmp(sr
->name
, "cpu-voltage-1"))
726 sens_cpu_volts
[1] = sr
;
727 else if (!strcmp(sr
->name
, "cpu-current-0"))
728 sens_cpu_amps
[0] = sr
;
729 else if (!strcmp(sr
->name
, "cpu-current-1"))
730 sens_cpu_amps
[1] = sr
;
731 else if (!strcmp(sr
->name
, "backside-temp"))
733 else if (!strcmp(sr
->name
, "hd-temp"))
748 have_all_sensors
= all_sensors
;
751 static int pm72_wf_notify(struct notifier_block
*self
,
752 unsigned long event
, void *data
)
755 case WF_EVENT_NEW_SENSOR
:
756 pm72_new_sensor(data
);
758 case WF_EVENT_NEW_CONTROL
:
759 pm72_new_control(data
);
762 if (have_all_controls
&& have_all_sensors
)
768 static struct notifier_block pm72_events
= {
769 .notifier_call
= pm72_wf_notify
,
772 static int wf_pm72_probe(struct platform_device
*dev
)
774 wf_register_client(&pm72_events
);
778 static int wf_pm72_remove(struct platform_device
*dev
)
780 wf_unregister_client(&pm72_events
);
782 /* should release all sensors and controls */
786 static struct platform_driver wf_pm72_driver
= {
787 .probe
= wf_pm72_probe
,
788 .remove
= wf_pm72_remove
,
794 static int __init
wf_pm72_init(void)
796 struct device_node
*cpu
;
799 if (!of_machine_is_compatible("PowerMac7,2") &&
800 !of_machine_is_compatible("PowerMac7,3"))
803 /* Count the number of CPU cores */
805 for_each_node_by_type(cpu
, "cpu")
807 if (nr_chips
> NR_CHIPS
)
810 pr_info("windfarm: Initializing for desktop G5 with %d chips\n",
813 /* Get MPU data for each CPU */
814 for (i
= 0; i
< nr_chips
; i
++) {
815 cpu_mpu_data
[i
] = wf_get_mpu(i
);
816 if (!cpu_mpu_data
[i
]) {
817 pr_err("wf_pm72: Failed to find MPU data for CPU %d\n", i
);
823 request_module("windfarm_fcu_controls");
824 request_module("windfarm_lm75_sensor");
825 request_module("windfarm_ad7417_sensor");
826 request_module("windfarm_max6690_sensor");
827 request_module("windfarm_cpufreq_clamp");
830 platform_driver_register(&wf_pm72_driver
);
834 static void __exit
wf_pm72_exit(void)
836 platform_driver_unregister(&wf_pm72_driver
);
839 module_init(wf_pm72_init
);
840 module_exit(wf_pm72_exit
);
842 MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
843 MODULE_DESCRIPTION("Thermal control for AGP PowerMac G5s");
844 MODULE_LICENSE("GPL");
845 MODULE_ALIAS("platform:windfarm");