diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-29 15:42:27 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-04-30 15:37:25 +1000 |
commit | 6cd3209967469f6e89d329deda6bb0b4700e7b62 (patch) | |
tree | 35f099b364bf811b44fa11c7d71eaa7b22d264a1 /drivers/macintosh/windfarm_core.c | |
parent | a78a4a03a75466ff859d989a1a00110ebd0165b0 (diff) | |
download | blackbird-op-linux-6cd3209967469f6e89d329deda6bb0b4700e7b62.tar.gz blackbird-op-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_core.c')
-rw-r--r-- | drivers/macintosh/windfarm_core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index ebafc2543d5f..3ee198b65843 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c @@ -169,8 +169,11 @@ static ssize_t wf_show_control(struct device *dev, int err; err = ctrl->ops->get_value(ctrl, &val); - if (err < 0) + if (err < 0) { + if (err == -EFAULT) + return sprintf(buf, "<HW FAULT>\n"); return err; + } switch(ctrl->type) { case WF_CONTROL_RPM_FAN: typestr = " RPM"; @@ -481,11 +484,6 @@ static int __init windfarm_core_init(void) { DBG("wf: core loaded\n"); - /* Don't register on old machines that use therm_pm72 for now */ - if (of_machine_is_compatible("PowerMac7,2") || - of_machine_is_compatible("PowerMac7,3") || - of_machine_is_compatible("RackMac3,1")) - return -ENODEV; platform_device_register(&wf_platform_device); return 0; } |