During a system resume, if a parent device is resumed before its
child, it may be possible that it will be runtime-suspended
immediately afterwards, as any child devices that were previously
runtime-suspended are likely still suspended. The result is that when
a child device is then resumed after the parent has gone back into
suspend, it will fail to re-awaken the parent.
Specifically in USB this is the case as a host controller would
first be resumed but would fall back into suspend because the child
device(s) had not resumed yet to affect the controller device's
power.child_count counter. This is fixed by ensuring (synchronously,
if necessary) that the parent is resumed by calling
pm_runtime_get_sync() just prior to resuming the child device.
CRs-fixed: 346643
Change-Id: I100166d9f6ee33666b68871c147cf5eaadde861f
Signed-off-by: Jack Pham <jackp@codeaurora.org>