| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Nov 4, 2003, at 3:32 AM, Jim Wintermyre wrote:
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?
Implement power management support in your driver... that is the best way. You already seem to have an idea on what you need to do (on power down save state as needed, on power up restore state, etc.). Apple's IOKit documentation covers power management [1] and how to support it [2].
| 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>) | |
| >Unload driver on sleep? (From: Jim Wintermyre <email@hidden>) | |
| >Re: Unload driver on sleep? (From: Shawn Erickson <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.