Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unload driver on sleep?



I have a PCI driver which doesn't support deep sleep, because... well, we haven't had time to implement proper support for it yet. However, if there are no clients of the driver, I can simply remove the driver, then put the machine to sleep, then reinstall the driver after the machine is woken up. i.e.:

"sudo kextunload -b com.mycompany.driver.myPCIdriver" before sleep, and
"sudo kextload /System/Library/Extensions/MyDriver.kext" after sleep

But of course this is not an ideal set of hoops to jump through from a user perspective. So, I'm wondering if, as an interim fix, I could do something to cause the same effect to happen in a sleep handler. I assume it's not as trivial as just manually calling my driver's stop()/start() functions... Basically I want to do this:

- On sleep request, if clients are attached then refuse deep sleep. If no clients are attached, do the same thing that would happen if the driver was unloaded, and allow deep sleep.

- On wake, do the same thing as when the driver is loaded normally.

Any ideas?

Thanks,
Jim
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.

References: 
 >Serial family IOkit questions (From: Peter Dufault <email@hidden>)
 >Re: Serial family IOkit questions (From: Garth Cummings <email@hidden>)
 >Re: Serial family IOkit questions (From: Peter Dufault <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.