PM / Domains: Choose the deepest state to enter if no devices using it
For a domain has no working devices anymore, let's choose the deepest state to enter to save power. e.g. driver probe failure. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
f93257d4e4
commit
85dd28204d
|
@ -548,6 +548,10 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on,
|
|||
if (!genpd->gov)
|
||||
genpd->state_idx = 0;
|
||||
|
||||
/* Choose the deepest state if no devices using this domain */
|
||||
if (!genpd->device_count)
|
||||
genpd->state_idx = genpd->state_count - 1;
|
||||
|
||||
/*
|
||||
* If sd_count > 0 at this point, one of the subdomains hasn't
|
||||
* managed to call genpd_power_on() for the master yet after
|
||||
|
|
Loading…
Reference in New Issue