@@ -291,7 +291,7 @@
static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
{
struct rockchip_pmu *pmu = pd->pmu;
- int ret;
+ int ret = 0;
mutex_lock(&pmu->mutex);
@@ -307,23 +307,24 @@
rockchip_pmu_save_qos(pd);
/* if powering down, idle request to NIU first */
- rockchip_pmu_set_idle_request(pd, true);
+ ret = rockchip_pmu_set_idle_request(pd, true);
}
rockchip_do_pmu_set_power_domain(pd, power_on);
if (power_on) {
/* if powering up, leave idle mode */
- rockchip_pmu_set_idle_request(pd, false);
+ ret = rockchip_pmu_set_idle_request(pd, false);
- rockchip_pmu_restore_qos(pd);
+ if (ret==0)
+ rockchip_pmu_restore_qos(pd);
}
clk_bulk_disable(pd->num_clks, pd->clks);
}
mutex_unlock(&pmu->mutex);
- return 0;
+ return ret;
}
static int rockchip_pd_power_on(struct generic_pm_domain *domain)