PowerMac7_2_UniProcCPUBExhaustFanControl.cpp [plain text]
#include "PowerMac7_2_UniProcCPUBExhaustFanControl.h"
#define super IOPlatformControl
OSDefineMetaClassAndStructors(PowerMac7_2_UniProcCPUBExhaustFanControl, IOPlatformControl)
IOReturn PowerMac7_2_UniProcCPUBExhaustFanControl::registerDriver( IOService * driver, const OSDictionary * dict, bool notify )
{
ControlValue speed;
IOReturn status = super::registerDriver(driver, dict, false);
speed = constantSpeed->unsigned32BitValue();
sendTargetValue( speed );
setTargetValue( speed );
return(status);
}
IOReturn PowerMac7_2_UniProcCPUBExhaustFanControl::initPlatformControl( const OSDictionary *dict )
{
IOReturn status = super::initPlatformControl( dict );
if ((constantSpeed = OSDynamicCast(OSNumber, dict->getObject("output-override"))) == NULL)
{
CONTROL_DLOG("PowerMac7_2_UniProcCPUBExhaustFanControl::initPlatformControl no speed supplied!!\n");
return(kIOReturnError);
}
return(status);
}