mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
soc: rockchip: power-domain: export idle request
We need to put the power status of HEVC IP into IDLE unless we can't reset that IP or the SoC would crash down. rockchip_pmu_idle_request(dev, true)---> enter idle rockchip_pmu_idle_request(dev, false)---> exit idle Change-Id: I76733efd2de4f7ee183c1b6bd1545d60038ee31b Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Randy Li <randy.li@rock-chips.com> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
This commit is contained in:
@@ -198,6 +198,29 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rockchip_pmu_idle_request(struct device *dev, bool idle)
|
||||
{
|
||||
struct generic_pm_domain *genpd;
|
||||
struct rockchip_pm_domain *pd;
|
||||
int ret;
|
||||
|
||||
if (IS_ERR_OR_NULL(dev))
|
||||
return -EINVAL;
|
||||
|
||||
if (IS_ERR_OR_NULL(dev->pm_domain))
|
||||
return -EINVAL;
|
||||
|
||||
genpd = pd_to_genpd(dev->pm_domain);
|
||||
pd = to_rockchip_pd(genpd);
|
||||
|
||||
mutex_lock(&pd->pmu->mutex);
|
||||
ret = rockchip_pmu_set_idle_request(pd, idle);
|
||||
mutex_unlock(&pd->pmu->mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(rockchip_pmu_idle_request);
|
||||
|
||||
static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user