summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorDong Aisheng <aisheng.dong@nxp.com>2017-11-30 17:32:08 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commite853e3072b14ad7c966a82d536950078f228014c (patch)
treee20fd38980ae152fdee2706d0570fecffa8c1980 /drivers/base
parent1b608258d61319ea15c41c6530806f52f6507d9c (diff)
MLK-17074-3 PM / Domains: use default state 0 to enter for multi states domains
If no valid state idx specified by governor, we use the default state_idx 0 to enter in case the domain has multi low power states. 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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 4b885e503c6d..9c3e535795a0 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -319,6 +319,13 @@ static int genpd_poweroff(struct generic_pm_domain *genpd, bool is_async)
if (genpd->gov && genpd->gov->power_down_ok) {
if (!genpd->gov->power_down_ok(&genpd->domain))
return -EAGAIN;
+ } else {
+ /*
+ * if no valid state idx specified by governor, we use
+ * the default state_idx 0 to enter in case the domain
+ * has multi low power states.
+ */
+ genpd->state_idx = 0;
}
if (genpd->power_off) {