• Patrick Mochel's avatar
    [power] Update device handling. · 54050a4e
    Patrick Mochel authored
    - From conversations with Ben Herrenschmidt. 
    
    Most devices should be able to handle powering down with interrupts enabled,
    which I already assume. But since suspending will stop I/O transactions
    before the call to power it off (making the device unusable anyway), there
    is no need to separate the calls - we may as well make it simpler for 
    driver authors and require that driver authors do everything at the same 
    time.
    
    There will always be devices that need to either power down or power up the
    device with interrupts disabled. They will get called with interrupts 
    enabled, but may return -EAGAIN to be called again with interrupts disabled
    to do what they need to do.
    
    System devices are now always called only with interrupts disabled. Come 
    on - they're system devices. Of course we need interrupts disabled.
    54050a4e
runtime.c 1.58 KB