linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state as off
@ 2025-01-10  6:13 Peng Fan (OSS)
  2025-01-13 10:31 ` Sudeep Holla
  0 siblings, 1 reply; 18+ messages in thread
From: Peng Fan (OSS) @ 2025-01-10  6:13 UTC (permalink / raw)
  To: sudeep.holla, cristian.marussi, ulf.hansson
  Cc: arm-scmi, linux-arm-kernel, linux-pm, linux-kernel,
	ranjani.vaidyanathan, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Per ARM SCMI Spec DEN0056E, page 16, "The platform may disable a resource
if no agent has requested to use that resource."

Linux Kernel should not rely on a state that it has not requested, so
make state as off during initialization.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/pmdomain/arm/scmi_pm_domain.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/pmdomain/arm/scmi_pm_domain.c b/drivers/pmdomain/arm/scmi_pm_domain.c
index a7784a8bb5db..eadfc032867f 100644
--- a/drivers/pmdomain/arm/scmi_pm_domain.c
+++ b/drivers/pmdomain/arm/scmi_pm_domain.c
@@ -89,13 +89,6 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
 		return -ENOMEM;
 
 	for (i = 0; i < num_domains; i++, scmi_pd++) {
-		u32 state;
-
-		if (power_ops->state_get(ph, i, &state)) {
-			dev_warn(dev, "failed to get state for domain %d\n", i);
-			continue;
-		}
-
 		scmi_pd->domain = i;
 		scmi_pd->ph = ph;
 		scmi_pd->name = power_ops->name_get(ph, i);
@@ -104,8 +97,7 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
 		scmi_pd->genpd.power_on = scmi_pd_power_on;
 		scmi_pd->genpd.flags = GENPD_FLAG_ACTIVE_WAKEUP;
 
-		pm_genpd_init(&scmi_pd->genpd, NULL,
-			      state == SCMI_POWER_STATE_GENERIC_OFF);
+		pm_genpd_init(&scmi_pd->genpd, NULL, true);
 
 		domains[i] = &scmi_pd->genpd;
 	}
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-01-17  5:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10  6:13 [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state as off Peng Fan (OSS)
2025-01-13 10:31 ` Sudeep Holla
2025-01-13 11:37   ` Peng Fan
2025-01-13 13:49     ` Sudeep Holla
2025-01-13 15:30       ` [EXT] " Ranjani Vaidyanathan
2025-01-13 17:20         ` Sudeep Holla
2025-01-13 17:54           ` Cristian Marussi
2025-01-13 19:40             ` Ranjani Vaidyanathan
2025-01-13 19:54           ` Ranjani Vaidyanathan
2025-01-14 15:24             ` Sudeep Holla
2025-01-14 16:09               ` Ranjani Vaidyanathan
2025-01-14 18:16                 ` Sudeep Holla
2025-01-15  9:15                 ` Cristian Marussi
2025-01-15 18:42                   ` Ranjani Vaidyanathan
2025-01-16 16:18                     ` Cristian Marussi
2025-01-17  1:22                       ` Peng Fan
2025-01-17  5:13                     ` Dan Carpenter
2025-01-13 19:33       ` Cristian Marussi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).