This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Request to power up a device from a non-active power mode
#include <sys/pm.h> int pmd_activate(pmd_attr_t *pmd, unsigned flags);
libpm
A driver can use pmd_activate() to request that the device be powered up from a non-active power mode. This requests a change to the mode specified by pmd->last_active (the last PM_MODE_ACTIVE mode the driver was set to).
This is typically required when the driver must perform some I/O operation and determines that the device is in a low power mode.
The pmd_attr_t structure must be locked using pmd_lock_shared() to ensure the pmd_attr_t power mode isn't subject to modification while it's performing these checks.
flags indicate the reason why the driver wants the device to be powered up:
If flags is 0, it indicates that the device must be powered up to service a driver client request.
The driver code responsible for performing power mode changes must arrange to unblock these blocked requests. |
For more information, see the device driver chapter.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
pmd_attr_t, pmd_lock_shared(), pmd_setmode()