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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to