The actions carried out during hibernation and resume from it are analogous to the ones described above.
The pm_runtime_disable () in pm_genpd_prepare () has to go under the genpd lock to prevent runtime PM from happening after we've done __pm_genpd_runtime_resume (), because pm_genpd_suspend () assumes that the device will be active.