Lines 43-49
__FBSDID("$FreeBSD$");
Link Here
|
43 |
#include "powermac_thermal.h" |
43 |
#include "powermac_thermal.h" |
44 |
|
44 |
|
45 |
/* A 10 second timer for spinning down fans. */ |
45 |
/* A 10 second timer for spinning down fans. */ |
46 |
#define FAN_HYSTERESIS_TIMER 10 |
46 |
#define FAN_HYSTERESIS_TIMER 30 |
47 |
|
47 |
|
48 |
static void fan_management_proc(void); |
48 |
static void fan_management_proc(void); |
49 |
static void pmac_therm_manage_fans(void); |
49 |
static void pmac_therm_manage_fans(void); |
Lines 143-152
pmac_therm_manage_fans(void)
Link Here
|
143 |
average_excess = max_excess_zone = 0; |
143 |
average_excess = max_excess_zone = 0; |
144 |
SLIST_FOREACH(sensor, &sensors, entries) { |
144 |
SLIST_FOREACH(sensor, &sensors, entries) { |
145 |
temp = imin(sensor->last_val, |
145 |
temp = imin(sensor->last_val, |
146 |
sensor->sensor->max_temp); |
146 |
sensor->sensor->high_temp); |
147 |
frac_excess = (temp - |
147 |
frac_excess = (temp - |
148 |
sensor->sensor->target_temp)*100 / |
148 |
sensor->sensor->target_temp)*100 / |
149 |
(sensor->sensor->max_temp - temp + 1); |
149 |
(sensor->sensor->high_temp - temp + 1); |
150 |
if (frac_excess < 0) |
150 |
if (frac_excess < 0) |
151 |
frac_excess = 0; |
151 |
frac_excess = 0; |
152 |
if (sensor->sensor->zone == fan->fan->zone) { |
152 |
if (sensor->sensor->zone == fan->fan->zone) { |