diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-29 11:42:27 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-30 01:37:25 -0400 |
commit | 6cd3209967469f6e89d329deda6bb0b4700e7b62 (patch) | |
tree | 35f099b364bf811b44fa11c7d71eaa7b22d264a1 /drivers/macintosh/windfarm_fcu_controls.c | |
parent | a78a4a03a75466ff859d989a1a00110ebd0165b0 (diff) |
powerpc/powermac: New windfarm driver for PowerMac G5 (AGP) and Xserve G5
This replaces the old therm_pm72 using the same windfarm infrastructure
that was used for other PowerMac G5 models. The fan speeds and sensors
should now be visible in the same location in sysfs.
The driver is split into separate core modules for PowerMac7,2 (and 7,3)
and RackMac3,1, with a lot of the shared code now in the separate sensor
and control modules.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/windfarm_fcu_controls.c')
-rw-r--r-- | drivers/macintosh/windfarm_fcu_controls.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c index 871f8b4cf367..b3411edb324b 100644 --- a/drivers/macintosh/windfarm_fcu_controls.c +++ b/drivers/macintosh/windfarm_fcu_controls.c | |||
@@ -41,10 +41,10 @@ | |||
41 | * applied to the setpoint RPM speed, that is basically the | 41 | * applied to the setpoint RPM speed, that is basically the |
42 | * speed we proviously "asked" for. | 42 | * speed we proviously "asked" for. |
43 | * | 43 | * |
44 | * I'm not sure which of these Apple's algorithm is supposed | 44 | * I'm using 0 for now which is what therm_pm72 used to do and |
45 | * to use | 45 | * what Darwin -apparently- does based on observed behaviour. |
46 | */ | 46 | */ |
47 | #define RPM_PID_USE_ACTUAL_SPEED 1 | 47 | #define RPM_PID_USE_ACTUAL_SPEED 0 |
48 | 48 | ||
49 | /* Default min/max for pumps */ | 49 | /* Default min/max for pumps */ |
50 | #define CPU_PUMP_OUTPUT_MAX 3200 | 50 | #define CPU_PUMP_OUTPUT_MAX 3200 |
@@ -154,8 +154,6 @@ static int wf_fcu_fan_set_rpm(struct wf_control *ct, s32 value) | |||
154 | if (value > fan->max) | 154 | if (value > fan->max) |
155 | value = fan->max; | 155 | value = fan->max; |
156 | 156 | ||
157 | if (fan->target && fan->target == value) | ||
158 | return 0; | ||
159 | fan->target = value; | 157 | fan->target = value; |
160 | 158 | ||
161 | buf[0] = value >> (8 - shift); | 159 | buf[0] = value >> (8 - shift); |
@@ -213,8 +211,6 @@ static int wf_fcu_fan_set_pwm(struct wf_control *ct, s32 value) | |||
213 | if (value > fan->max) | 211 | if (value > fan->max) |
214 | value = fan->max; | 212 | value = fan->max; |
215 | 213 | ||
216 | if (fan->target && fan->target == value) | ||
217 | return 0; | ||
218 | fan->target = value; | 214 | fan->target = value; |
219 | 215 | ||
220 | value = (value * 2559) / 1000; | 216 | value = (value * 2559) / 1000; |