All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Bozeman <daniel@orb.net>
To: ulf.hansson@linaro.org, heiko@sntech.de
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Daniel Bozeman <daniel@orb.net>
Subject: [PATCH 2/2] pmdomain/rockchip: skip domains returning -EPROBE_DEFER
Date: Tue, 31 Mar 2026 18:02:23 +0000	[thread overview]
Message-ID: <20260331180223.1682283-2-daniel@orb.net> (raw)
In-Reply-To: <20260331180223.1682283-1-daniel@orb.net>

When iterating child nodes during probe, a single domain returning
-EPROBE_DEFER (e.g. due to clock dependencies not yet available)
causes the entire power domain controller to fail and tear down all
successfully registered domains.

This creates a window where devices in unrelated power domains that
would have registered successfully cannot access their hardware. On
RK3528, PD_GPU requires CRU clocks that may not be available yet,
but the idle-only domains (PD_RKVENC, PD_VO, PD_VPU) have no clock
requirements. When the controller fails due to PD_GPU, GPIO
controllers in PD_RKVENC become inaccessible, leading to synchronous
external aborts when GPIO-controlled regulators probe.

Skip domains that return -EPROBE_DEFER and continue registering the
rest. Skipped domains have NULL entries in the provider, causing
their consumers to receive -ENOENT and defer until available.

Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver")
Signed-off-by: Daniel Bozeman <daniel@orb.net>
---
 drivers/pmdomain/rockchip/pm-domains.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 2eecae092a..f42880c94f 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -1077,6 +1077,11 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	for_each_available_child_of_node_scoped(np, node) {
 		error = rockchip_pm_add_one_domain(pmu, node);
 		if (error) {
+			if (error == -EPROBE_DEFER) {
+				dev_dbg(dev, "skipped node %pOFn, dependencies not yet available\n",
+					node);
+				continue;
+			}
 			dev_err(dev, "failed to handle node %pOFn: %d\n",
 				node, error);
 			goto err_out;
-- 
2.43.0



WARNING: multiple messages have this Message-ID (diff)
From: Daniel Bozeman <daniel@orb.net>
To: ulf.hansson@linaro.org, heiko@sntech.de
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Daniel Bozeman <daniel@orb.net>
Subject: [PATCH 2/2] pmdomain/rockchip: skip domains returning -EPROBE_DEFER
Date: Tue, 31 Mar 2026 18:02:23 +0000	[thread overview]
Message-ID: <20260331180223.1682283-2-daniel@orb.net> (raw)
In-Reply-To: <20260331180223.1682283-1-daniel@orb.net>

When iterating child nodes during probe, a single domain returning
-EPROBE_DEFER (e.g. due to clock dependencies not yet available)
causes the entire power domain controller to fail and tear down all
successfully registered domains.

This creates a window where devices in unrelated power domains that
would have registered successfully cannot access their hardware. On
RK3528, PD_GPU requires CRU clocks that may not be available yet,
but the idle-only domains (PD_RKVENC, PD_VO, PD_VPU) have no clock
requirements. When the controller fails due to PD_GPU, GPIO
controllers in PD_RKVENC become inaccessible, leading to synchronous
external aborts when GPIO-controlled regulators probe.

Skip domains that return -EPROBE_DEFER and continue registering the
rest. Skipped domains have NULL entries in the provider, causing
their consumers to receive -ENOENT and defer until available.

Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver")
Signed-off-by: Daniel Bozeman <daniel@orb.net>
---
 drivers/pmdomain/rockchip/pm-domains.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 2eecae092a..f42880c94f 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -1077,6 +1077,11 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
 	for_each_available_child_of_node_scoped(np, node) {
 		error = rockchip_pm_add_one_domain(pmu, node);
 		if (error) {
+			if (error == -EPROBE_DEFER) {
+				dev_dbg(dev, "skipped node %pOFn, dependencies not yet available\n",
+					node);
+				continue;
+			}
 			dev_err(dev, "failed to handle node %pOFn: %d\n",
 				node, error);
 			goto err_out;
-- 
2.43.0


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2026-03-31 18:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 18:02 [PATCH 1/2] pmdomain/rockchip: skip QoS operations for idle-only domains Daniel Bozeman
2026-03-31 18:02 ` Daniel Bozeman
2026-03-31 18:02 ` Daniel Bozeman [this message]
2026-03-31 18:02   ` [PATCH 2/2] pmdomain/rockchip: skip domains returning -EPROBE_DEFER Daniel Bozeman
2026-04-01  1:17 ` [PATCH 1/2] pmdomain/rockchip: skip QoS operations for idle-only domains Shawn Lin
2026-04-01  1:17   ` Shawn Lin
     [not found]   ` <CAG+Ngm+xJCCQMPddZx8AbPEeH3rUrn3GKF575zXpGPJrnELvMw@mail.gmail.com>
2026-04-01  2:54     ` Shawn Lin
2026-04-01  2:54       ` Shawn Lin
2026-04-01  6:13       ` Daniel Bozeman
2026-04-01  6:13         ` Daniel Bozeman
2026-04-01  7:11         ` Shawn Lin
2026-04-01  7:11           ` Shawn Lin
2026-04-03 21:27           ` Daniel Bozeman
2026-04-03 21:27             ` Daniel Bozeman
2026-04-04 11:40             ` Shawn Lin
2026-04-04 11:40               ` Shawn Lin
2026-04-04 22:42               ` Daniel Bozeman
2026-04-04 22:42                 ` Daniel Bozeman
2026-04-05 23:29               ` Jonas Karlman
2026-04-05 23:29                 ` Jonas Karlman
2026-04-06 23:55                 ` Daniel Bozeman
2026-04-06 23:55                   ` Daniel Bozeman
2026-04-28  1:32                   ` Daniel Bozeman
2026-04-28  1:32                     ` Daniel Bozeman

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=20260331180223.1682283-2-daniel@orb.net \
    --to=daniel@orb.net \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.