[Previous] [Contents] [Next]

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

pmd_attr_t

Power management support structure for device drivers

Synopsis:

typedef struct pmd_attr  pmd_attr_t;

struct pmd_attr { 
   pm_hdl_t hdl; 
   unsigned pmm_flags; /* flags set by pmd_attach() */

   const pmd_mode_attr_t  *cur_attr;  /* current device power attr  */
   unsigned               cur_flags;  /* flags used to set cur_mode */
   const pmd_mode_attr_t  *new_attr;  /* new attr if in transition  */
   unsigned               new_flags;  /* flags used to set new_mode */
   pm_power_mode_t      last_active;  /* last active mode device was in*/

   const pmd_mode_attr_t  *modes;     /* device power modes   */
   
   int nmodes;

   void  *data;                       /* driver specific data pointer */
   pmd_setpower_t  setpower;          /* driver mode change function  */
   short 
   setpower_flags;                    /* driver flags for setpower() use B */

   short lock_flag;
   short want_ex;
   short lock_sh;

   struct sigevent  event;

  _Uint32t  seqno;
   Uint32t  reserved[7];
};

Description:

The pmd_attr_t structure contains driver level power management information used by the libpm library functions.

hdl
Handle to the power manager object for the device.
pmm_flags
Contain various flags set by pmd_attach().
cur_attr
Contain the mode flags used to set the current mode.
new_attr
Pointer to the pmd_mode_attr_t for the new mode to be set once mode change has been requested. If no mode change is in progress, it is same as cur_attr.
new_flags
contains the mode flags used to set the new mode.
setpower
Pointer to a driver specific function invoked to perform a power mode change.
data
pointer to a driver specific data structure passed to the setpower() function when it's invoked.
setpower_flags
Available for driver use to set driver specific flags during and across calls to setpower(). It's not used by any libpm library functions.
last_active
The most recent PM_MODE_ACTIVE that was set. This is the mode used by pmd_active() to restore the device to its previous PM_MODE_ACTIVE mode.

Other fields within the pmd_attr_t structure are intended only for internal use by the libpm library.

Classification:

See also:

pmd_mode_attr_t, pmd_attr_init(), pmd_attr_setmodes(), pmd_attr_setpower(), pmd_attach()


[Previous] [Contents] [Next]