• Patrick Mochel's avatar
    [power] Add hooks for runtime device power control. · 86ccb795
    Patrick Mochel authored
    dpm_runtime_{suspend,resume} control the power state of a single device 
    while the system is running. 
    
    dpm_runtime_suspend() will save state of the device, then attempt to power
    it down. This happens with interrupts enabled, so if the device does not 
    support that, the device's state is restored, and we continue on our merry
    way.
    
    dpm_runtime_resume() powers the device back on, then restores state of the
    device.
    
    dpm_set_power_state() simply notifies the core of the power state the
    device is in. Drivers can use this, since they are the only ones that can
    really tell.
    86ccb795
suspend.c 5.82 KB