return kIOReturnSuccess;
}
+IOReturn IOService::setIgnoreIdleTimer( bool ignore )
+{
+ if (!initialized)
+ return IOPMNotYetInitialized;
+
+ OUR_PMLog(kIOPMRequestTypeIgnoreIdleTimer, ignore, 0);
+
+ IOPMRequest * request =
+ acquirePMRequest( this, kIOPMRequestTypeIgnoreIdleTimer );
+ if (!request)
+ return kIOReturnNoMemory;
+
+ request->fArg0 = (void *) ignore;
+ submitPMRequest( request );
+
+ return kIOReturnSuccess;
+}
+
//******************************************************************************
// [public] nextIdleTimeout
//
// Device was active - do not drop power, restart timer.
fDeviceWasActive = false;
}
- else
+ else if (!fIdleTimerIgnored)
{
// No device activity - drop power state by one level.
// Decrement the cached tickle power state when possible.
getPMRootDomain()->traceDetail( detail );
}
- retCode = context->us->messageClient(msgType, object, (void *) ¬ify);
+ retCode = context->us->messageClient(msgType, object, (void *) ¬ify, sizeof(notify));
if ( kIOReturnSuccess == retCode )
{
if ( 0 == notify.returnValue )
notify.stateNumber = context->stateNumber;
notify.stateFlags = context->stateFlags;
- context->us->messageClient(context->messageType, object, ¬ify);
+ context->us->messageClient(context->messageType, object, ¬ify, sizeof(notify));
if ((kIOLogDebugPower & gIOKitDebug) &&
(OSDynamicCast(_IOServiceInterestNotifier, object)))
}
break;
+ case kIOPMRequestTypeIgnoreIdleTimer:
+ fIdleTimerIgnored = request->fArg0 ? 1 : 0;
+ break;
+
default:
panic("executePMRequest: unknown request type %x", request->getType());
}