MLK-17074-1 PM / Domains: support enter deepest state for multiple states domains
authorDong Aisheng <aisheng.dong@nxp.com>
Fri, 24 Nov 2017 08:31:32 +0000 (16:31 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:49:54 +0000 (14:49 -0500)
commit595dba077d0a451ffaeb23a7181cfb4867b0c086
tree1180456ed5e70d954b4a307da41b30c51dc98b74
parent594fc57651fd521ed1e7125e0daa1e42793afe24
MLK-17074-1 PM / Domains: support enter deepest state for multiple states domains

Currently the generic power domain suspend code pm_genpd_suspend_noirq
will try to power off a domain used by devices in genpd_sync_poweroff
if its status is not GPD_STATE_ACTIVE.

However, for power domains supporting multiple low power states, it may
already enter an intermediate low power state by runtime PM before system
suspend and the status is already GPD_STATE_POWER_OFF which results in
then the power domain stay at an intermediate low power state during
system suspend.

Let's give the power domain a chance to switch to the deepest state in
case it's already off but in an intermediate low power state.
Due to power domain is alway off, so no need to check device wakeup
case anymore.

Reviewed-by: Frank Li <frank.li@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/base/power/domain.c
include/linux/pm_domain.h