mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
soc: rockchip: power-domain: Only don't power down pd when enable always on
Fixes: ad7e570f0d ("soc: rockchip: power-domain: Add support to keep domains power on")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I68a96cec47bd17c9e5f777a21a1b25b86f888715
This commit is contained in:
@@ -498,6 +498,9 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
|
||||
int ret = 0;
|
||||
struct generic_pm_domain *genpd = &pd->genpd;
|
||||
|
||||
if (pm_domain_always_on && !power_on)
|
||||
return 0;
|
||||
|
||||
rockchip_pmu_lock(pd);
|
||||
|
||||
if (rockchip_pmu_domain_is_on(pd) != power_on) {
|
||||
@@ -910,7 +913,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
||||
if (pd_info->active_wakeup)
|
||||
pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
|
||||
#ifndef MODULE
|
||||
if (pd_info->keepon_startup || pm_domain_always_on) {
|
||||
if (pd_info->keepon_startup) {
|
||||
pd->genpd.flags |= GENPD_FLAG_ALWAYS_ON;
|
||||
if (!rockchip_pmu_domain_is_on(pd)) {
|
||||
error = rockchip_pd_power(pd, true);
|
||||
@@ -1088,7 +1091,7 @@ static int __init rockchip_pd_keepon_release(void)
|
||||
struct rockchip_pm_domain *pd;
|
||||
int i;
|
||||
|
||||
if (!g_pmu || pm_domain_always_on)
|
||||
if (!g_pmu)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < g_pmu->genpd_data.num_domains; i++) {
|
||||
|
||||
Reference in New Issue
Block a user