[Previous] [Contents] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

mode_init() callback

Called when the driver supplies the initial power modes

Synopsis:

#include <sys/pmm.h>

void mode_init(void *data, resmgr_context_t *ctp, 
                     const pm_power_attr_t *attr, 
                   const pm_power_mode_t *modes);

Library:

libc

Description:

This function is called when a driver attaches to a power manager node and supplies the initial power modes:

data
Policy specific data returned by the create() function when the node was created.
ctp
Obtain information about the driver process.
attr
Describes initial power mode of the device.
modes
Contains a list of the supported power modes. It is specified by attr -> num_modes.

This call is provided to allow the policy to determine when a node's power modes become valid. Nodes cannot be power managed until a driver attaches to register. Driver is responsible for implementing the power mode changes for the node.

There is no default action for this call.

Returns:

Classification:

QNX Neutrino

Safety:
Cancellation point Unknown
Interrupt handler Unknown
Signal handler Unknown
Thread Unknown

See also:


[Previous] [Contents] [Next]