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>
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) {