Register as a power-managed device driver
#include <sys/io-char.h>
int iochar_regdrv_power(TTYDEV *dev, 
                        TTYINITPOWER *init,
                        unsigned flags);
- dev
- A pointer to the structure that represents the specific device that data has been received on.
- init
- A pointer to the structure that represents the power-managed device registration info.
- flags
- Common power-management flags. One of:
  
- PWR_INIT_DRVREG — register as a power-managed device.
  
  
- PWR_INIT_DRVPSTORE — driver wants its own persistent storage object .
  
  
- PWR_INIT_DRVSAVE — driver wants to store data for HWVOL or NORAM 
  
  
- PWR_INIT_DRVOVERRIDE — driver will assume all setpower functionality. 
  
  
- PWR_INIT_DRVNOFLOWCTL — driver should delay
   before powering down for flow control.
  
  
- PWR_INIT_NOPMM —indicates that there is no power manager running on initializing.
  
  
- PWR_WAITING_DRAIN — a power change is waiting for device to drain. 
    
  
- PWR_FLOW_PAGED — device is HW or SW paged due to power.
  
  
- PWR_EVENT_DEVCTL — check devctl blocking queue.
  
  
- PWR_EVENT_DEVWAKEUP — device wants to wake up
   due to an external event such as a device wakeup event (this is NOT a CPU wakeup) .
  
  
- PM_MODE_HW_NONE — power mode does not support any hardware access .
  
  
  
- PM_MODE_HW_TX — power mode allows transmit.
  
  
  
- PM_MODE_HW_RX — power mode allows receive.
  
  
  
- PM_MODE_HW_CTRL — power mode allows control over RTS/DTR lines.
  
  
  
- PM_MODE_HW_REGREAD — power mode allows registers to be read .
  
  
  
- PM_MODE_HW_REGWRITE — power mode allows registers to be written. 
  
  
  
- PM_MODE_HW_ALL — power mode allows full device access .
  
  
  
- PM_MODE_HW_RXTX — power mode allows transmit and receive.
  
  
  
- PM_MODE_HW_REG — power mode allows registers to be read and written.
  
  
  
- PM_MODE_HW_DRAIN — power mode allows registers to be read and be transmitted.
  
  
  
- PM_MODE_HW_OFF —OFF modes should not allow any HW access.
  
  
  
- PM_MODE_HW_ACTIVE — ACTIVE modes should allow full HW access.
  
  
 
 
This function registers with io-char as a power-managed driver. 
If you're writing a power-managed device driver, call iochar_regdrv_power()
before calling ttc(TTC_INIT_POWER, ...). 
- 0
- Success.
- -1
- An error occurred.
QNX Neutrino
| Safety: |  | 
|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
TTYDEV,
ttc(),
tti(),
tto()