From c545e706e40d8ae663b70fd248c7f1565dca45da Mon Sep 17 00:00:00 2001 From: Jacky Bai Date: Mon, 2 Mar 2020 20:28:47 +0800 Subject: [PATCH] MLK-23622-01 soc: imx: Add active wakeup flag for domain with active-wakeup property Add the active wakeup flag if a power domain has such requirement. Signed-off-by: Jacky Bai Reviewed-by: Anson Huang --- Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt | 2 ++ drivers/soc/imx/imx8m_pm_domains.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt b/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt index a92a7103de38..ce2a1dffd641 100644 --- a/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt +++ b/Documentation/devicetree/bindings/power/fsl,imx8m-genpd.txt @@ -18,6 +18,8 @@ Optional properties: located inside this power domain - power-supply: Power supply used to power the domain - parent-domains: the phandle to the parent power domain + - active-wakeup: keep the PM domain powered in case the attached device wakeup + is enabled. example: vpu_g1_pd: vpug1-pd { diff --git a/drivers/soc/imx/imx8m_pm_domains.c b/drivers/soc/imx/imx8m_pm_domains.c index ce06a059eaaa..72d328f29b38 100644 --- a/drivers/soc/imx/imx8m_pm_domains.c +++ b/drivers/soc/imx/imx8m_pm_domains.c @@ -179,6 +179,8 @@ static int imx8m_pm_domain_probe(struct platform_device *pdev) domain->pd.power_off = imx8m_pd_power_off; domain->pd.power_on = imx8m_pd_power_on; + if (of_property_read_bool(np, "active-wakeup")) + domain->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP; pm_genpd_init(&domain->pd, NULL, true);