MLK-23671-01 soc: imx: Add the rpm always on flag if necessary

Some power domain need to be runtime always on to keep
the peripherals's weekup ability, for such power domain,
add the 'GENPD_FLAG_RPM_ALWAYS_ON' flag.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
This commit is contained in:
Jacky Bai 2020-03-24 17:04:11 +08:00
parent fedb5f3827
commit d376118ae3
2 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,7 @@ Optional properties:
- parent-domains: the phandle to the parent power domain
- active-wakeup: keep the PM domain powered in case the attached device wakeup
is enabled.
- rpm-always-on: keep the PM domain powered except for system suspend.
example:
vpu_g1_pd: vpug1-pd {

View File

@ -181,8 +181,10 @@ static int imx8m_pm_domain_probe(struct platform_device *pdev)
domain->pd.power_on = imx8m_pd_power_on;
if (of_property_read_bool(np, "active-wakeup"))
domain->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
if (of_property_read_bool(np, "rpm-always-on"))
domain->pd.flags |= GENPD_FLAG_RPM_ALWAYS_ON;
pm_genpd_init(&domain->pd, NULL, true);
pm_genpd_init(&domain->pd, NULL, !(domain->pd.flags & GENPD_FLAG_RPM_ALWAYS_ON));
ret = of_genpd_add_provider_simple(np, &domain->pd);
if (ret) {