mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] pmdomain: rockchip: inform about missing subdomain support when in use
Date: Thu, 19 Mar 2026 08:02:16 +0100	[thread overview]
Message-ID: <20260319070216.1935180-1-s.hauer@pengutronix.de> (raw)

On RK3588 the Rockchip power domain driver comes up with several
messages informing about missing subdomain support. Make this less
verbose by printing these messages only when power domains with
subdomains are actually used.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/pmdomain/rockchip/pm-domains.c | 31 +++++++++++++++++---------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 4916515f27..1e735dfe34 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -644,6 +644,23 @@ static int rockchip_pd_regulator_enable(struct rockchip_pm_domain *pd)
 	return regulator_enable(pd->supply);
 }
 
+static void rockchip_pm_power_on_subdomain(struct rockchip_pm_domain *pd)
+{
+	struct device_node *np;
+	int ngpd = 0;
+
+	for_each_child_of_node(pd->node, np)
+		ngpd++;
+
+	/*
+	 * TODO: implement pm_genpd_add_subdomain() support for barebox.
+	 * Until we need to, just let the user know about it
+	 */
+	if (ngpd)
+		dev_info(pd->pmu->dev, "%s: skipping %u nested power domains\n",
+			 pd->node->name, ngpd);
+}
+
 static int rockchip_pd_power_on(struct generic_pm_domain *domain)
 {
 	struct rockchip_pm_domain *pd = to_rockchip_pd(domain);
@@ -661,6 +678,8 @@ static int rockchip_pd_power_on(struct generic_pm_domain *domain)
 	if (ret)
 		rockchip_pd_regulator_disable(pd);
 
+	rockchip_pm_power_on_subdomain(pd);
+
 	return ret;
 }
 
@@ -873,19 +892,11 @@ static void rockchip_configure_pd_cnt(struct rockchip_pmu *pmu,
 static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
 				     struct device_node *parent)
 {
-	struct device_node *np;
-	int ngpd = 0;
-
-	for_each_child_of_node(parent, np)
-		ngpd++;
-
 	/*
 	 * TODO: implement pm_genpd_add_subdomain() support for barebox.
-	 * Until we need to, just let the user know about it
+	 * Until we need to, just let the user know about it when power domains
+	 * with subdomains are used.
 	 */
-	if (ngpd)
-		dev_info(pmu->dev, "%s: skipping %u nested power domains\n",
-			 parent->name, ngpd);
 
 	return 0;
 }
-- 
2.47.3




             reply	other threads:[~2026-03-19  7:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  7:02 Sascha Hauer [this message]
2026-03-20  6:35 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260319070216.1935180-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox