The minor power IRP code IRP_MN_WAIT_WAKE provides for waking a device or waking the system. Drivers of devices that can wake themselves or the system send IRP_MN_WAIT_WAKE requests. The system sends IRP_MN_WAIT_WAKE requests only to devices that always wake the system, such as the power-on switch.
A driver sends an IRP_MN_WAIT_WAKE request for one of two reasons:
Its device must be able to return to the working state from a sleep state in response to an external wake-up signal.
For example, a modem's driver might send it a wait/wake IRP before setting it in power state D1 to conserve energy. The wait/wake IRP enables the modem to respond to an incoming call.
Its device must be able to wake the system in response to a wake-up signal.
When the system goes to sleep, the modem might remain in state D1 with an IRP_MN_WAIT_WAKE pending. In this case, an incoming call would wake the system as well as the modem.
Whether a device is prepared to wake itself or the system, the actions its drivers must take are the same. The primary difference lies in how the device and system hardware respond to the initial wake-up signal. Driver behavior is the same in either case.