lkml.org 
[lkml]   [2015]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] driver core: Ensure proper suspend/resume ordering
    On Wed, 16 Sep 2015, Grygorii Strashko wrote:

    > >> The core prohibits new devices from being registered. It does not
    > >> prohibit probes of existing devices, because they currently do not
    > >> affect the dpm_list.
    >
    > Seems I missed smth, but I can't find the place in Kernel that prohibits
    > creation of new devices during suspend.
    >
    > Could someone point me on, please?

    In Documentation/power/devices.txt, there is a section describing the
    various phases of system suspend. The part about the "prepare" phase
    says:

    1. The prepare phase is meant to prevent races by preventing new devices
    from being registered; the PM core would never know that all the
    children of a device had been suspended if new children could be
    registered at will. (By contrast, devices may be unregistered at any
    time.) Unlike the other suspend-related phases, during the prepare
    phase the device tree is traversed top-down.

    After the prepare callback method returns, no new children may be
    registered below the device. The method may also prepare the device or
    driver in some way for the upcoming system power transition, but it
    should not put the device into a low-power state.

    Alan Stern



    \
     
     \ /
      Last update: 2015-09-16 19:21    [W:3.741 / U:0.360 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site