From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 2/5] pmdomain: look up pmdomain even if not have_genpd_providers
Date: Mon, 27 Oct 2025 07:53:05 +0100 [thread overview]
Message-ID: <20251027065315.2419160-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20251027065315.2419160-1-a.fatoum@barebox.org>
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
drivers/base/power.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/base/power.c b/drivers/base/power.c
index d60a00f5735e..0cdece210d94 100644
--- a/drivers/base/power.c
+++ b/drivers/base/power.c
@@ -371,9 +371,6 @@ static int __genpd_dev_pm_attach(struct device *dev,
struct generic_pm_domain *pd;
int ret;
- if (!have_genpd_providers)
- return 0;
-
ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
"#power-domain-cells", index, &pd_args);
if (ret < 0)
@@ -384,11 +381,18 @@ static int __genpd_dev_pm_attach(struct device *dev,
ret = PTR_ERR(pd);
dev_dbg(dev, "%s() failed to find PM domain: %d\n",
__func__, ret);
+
+ if (ret == -ENOENT)
+ ret = -EPROBE_DEFER;
+
+ if (!have_genpd_providers && ret == -EPROBE_DEFER)
+ return 0;
+
/*
* Assume that missing genpds are unresolved
* dependency are report them as deferred
*/
- return (ret == -ENOENT) ? -EPROBE_DEFER : ret;
+ return ret;
}
dev_dbg(dev, "adding to PM domain %s\n", pd ? pd->name : "dummy");
--
2.47.3
next prev parent reply other threads:[~2025-10-27 6:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 6:53 [PATCH 1/5] regulator: implement dev_of_regulator_get Ahmad Fatoum
2025-10-27 6:53 ` Ahmad Fatoum [this message]
2025-10-27 7:19 ` [PATCH 2/5] pmdomain: look up pmdomain even if not have_genpd_providers Ahmad Fatoum
2025-10-27 6:53 ` [PATCH 3/5] pmdomain: warn if deep probe enabled and driver missing Ahmad Fatoum
2025-10-27 6:53 ` [PATCH 4/5] pmdomain: allow callback for when devices are attached Ahmad Fatoum
2025-10-27 6:53 ` [PATCH 5/5] pmdomain: add Rockchip power domain support Ahmad Fatoum
2025-10-27 12:27 ` [PATCH 1/5] regulator: implement dev_of_regulator_get Ahmad Fatoum
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=20251027065315.2419160-2-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--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