On further thought maybe the existing methods can be used, with care.
Drivers would have to assume the responsibility of synchronizing with
their helper threads and stopping addition of new children (something
they should already be doing), and they would also have to check that
all the existing children are already suspended. They should not make
the assumption that the PM core has already suspended all the children.
The PM core could help detect errors here. If it tries to suspend a
device and sees that the device's parent is already suspended, then the
parent's driver has a bug.
Alan Stern
--