summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_fcu_controls.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-29 17:42:27 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-30 07:37:25 +0200
commit6cd3209967469f6e89d329deda6bb0b4700e7b62 (patch)
tree35f099b364bf811b44fa11c7d71eaa7b22d264a1 /drivers/macintosh/windfarm_fcu_controls.c
parentpowerpc/windfarm: Add Fan Control Unit controls for G5s (diff)
downloadlinux-6cd3209967469f6e89d329deda6bb0b4700e7b62.tar.xz
linux-6cd3209967469f6e89d329deda6bb0b4700e7b62.zip
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.c10
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 @@
* applied to the setpoint RPM speed, that is basically the
* speed we proviously "asked" for.
*
- * I'm not sure which of these Apple's algorithm is supposed
- * to use
+ * I'm using 0 for now which is what therm_pm72 used to do and
+ * what Darwin -apparently- does based on observed behaviour.
*/
-#define RPM_PID_USE_ACTUAL_SPEED 1
+#define RPM_PID_USE_ACTUAL_SPEED 0
/* Default min/max for pumps */
#define CPU_PUMP_OUTPUT_MAX 3200
@@ -154,8 +154,6 @@ static int wf_fcu_fan_set_rpm(struct wf_control *ct, s32 value)
if (value > fan->max)
value = fan->max;
- if (fan->target && fan->target == value)
- return 0;
fan->target = value;
buf[0] = value >> (8 - shift);
@@ -213,8 +211,6 @@ static int wf_fcu_fan_set_pwm(struct wf_control *ct, s32 value)
if (value > fan->max)
value = fan->max;
- if (fan->target && fan->target == value)
- return 0;
fan->target = value;
value = (value * 2559) / 1000;