[PATCH/RFC 3/9] pmdomain: arm: scmi: Add always-on support

Geert Uytterhoeven <[email protected]>
Newsgroups org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.kernel.vger.linux-renesas-soc
Message-ID <7a2539873a80840eb2ebce4479cbc83a1fbf5579.1781171705.git.geert+renesas@glider.be>
Extend the PM domain flags with the flags advertized by the SCMI core.
For now this is limited to GENPD_FLAG_ALWAYS_ON.

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
Questions:
  - Should the power_ops->state_get() call be skipped in case of an
    always-on domain, and state just be force to
    SCMI_POWER_STATE_GENERIC_ON instead?
  - Should the power_ops->state_set() call be skipped in case of an
    always-on domain? Or might this cause issues with some firmware
    implementations?
Skipping these calls may avoid adding quirk code later...
---
 drivers/pmdomain/arm/scmi_pm_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pmdomain/arm/scmi_pm_domain.c b/drivers/pmdomain/arm/scmi_pm_domain.c
index 965592e828741b11..8e67f971c707e121 100644
--- a/drivers/pmdomain/arm/scmi_pm_domain.c
+++ b/drivers/pmdomain/arm/scmi_pm_domain.c
@@ -104,7 +104,8 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
 		scmi_pd->genpd.name = scmi_pd->name;
 		scmi_pd->genpd.power_off = scmi_pd_power_off;
 		scmi_pd->genpd.power_on = scmi_pd_power_on;
-		scmi_pd->genpd.flags = GENPD_FLAG_ACTIVE_WAKEUP;
+		scmi_pd->genpd.flags = GENPD_FLAG_ACTIVE_WAKEUP |
+				       info->genpd_flags;
 
 		pm_genpd_init(&scmi_pd->genpd, NULL,
 			      state == SCMI_POWER_STATE_GENERIC_OFF);
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.