From: Arun Iyengar via B4 Relay <devnull+aiyengar1990.gmail.com@kernel.org>
To: Ulf Hansson <ulfh@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
Shawn Lin <shawn.lin@rock-chips.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org, Yao Zi <me@ziyao.cc>,
Arun Iyengar <aiyengar1990@gmail.com>
Subject: [PATCH 3/3] pmdomain: rockchip: report domain errors where they happen
Date: Thu, 26 Nov 2026 10:01:26 +0000 [thread overview]
Message-ID: <20261126-pmdomain-rockchip-cleanup-v1-3-a19f5ea7d555@gmail.com> (raw)
In-Reply-To: <20261126-pmdomain-rockchip-cleanup-v1-0-a19f5ea7d555@gmail.com>
From: Arun Iyengar <aiyengar1990@gmail.com>
Print the clock prepare and pm_qos failures with dev_err_probe() and
drop the callers' "failed to handle node" messages. Each error is now
reported once, and -ENOMEM stays quiet.
Suggested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
drivers/pmdomain/rockchip/pm-domains.c | 40 +++++++++++++++-------------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 9d5a79c6d4f9..c3df32934120 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -881,17 +881,19 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
for (i = 0; i < pd->num_clks; i++) {
pd->clks[i].clk = of_clk_get(node, i);
if (IS_ERR(pd->clks[i].clk)) {
- error = PTR_ERR(pd->clks[i].clk);
- dev_err_probe(pmu->dev, error,
- "%pOFn: failed to get clk at index %d: %d\n",
- node, i, error);
+ error = dev_err_probe(pmu->dev, PTR_ERR(pd->clks[i].clk),
+ "%pOFn: failed to get clk at index %d\n",
+ node, i);
goto err_put_clocks;
}
}
error = clk_bulk_prepare(pd->num_clks, pd->clks);
- if (error)
+ if (error) {
+ dev_err_probe(pmu->dev, error,
+ "%pOFn: failed to prepare clocks\n", node);
goto err_put_clocks;
+ }
pd->num_qos = of_count_phandle_with_args(node, "pm_qos",
NULL);
@@ -916,13 +918,18 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
for (j = 0; j < pd->num_qos; j++) {
qos_node = of_parse_phandle(node, "pm_qos", j);
if (!qos_node) {
- error = -ENODEV;
+ error = dev_err_probe(pmu->dev, -ENODEV,
+ "%pOFn: failed to get pm_qos %d\n",
+ node, j);
goto err_unprepare_clocks;
}
pd->qos_regmap[j] = syscon_node_to_regmap(qos_node);
of_node_put(qos_node);
if (IS_ERR(pd->qos_regmap[j])) {
- error = PTR_ERR(pd->qos_regmap[j]);
+ error = dev_err_probe(pmu->dev,
+ PTR_ERR(pd->qos_regmap[j]),
+ "%pOFn: failed to get pm_qos %d regmap\n",
+ node, j);
goto err_unprepare_clocks;
}
}
@@ -1074,13 +1081,8 @@ static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
error = rockchip_pm_add_one_domain(pmu, np,
to_rockchip_pd(parent_domain));
- if (error) {
- if (error != -EPROBE_DEFER)
- dev_err(pmu->dev,
- "failed to handle node %pOFn: %d\n",
- np, error);
+ if (error)
return error;
- }
error = of_property_read_u32(np, "reg", &idx);
if (error)
@@ -1162,20 +1164,12 @@ 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, NULL);
- if (error) {
- if (error != -EPROBE_DEFER)
- dev_err(dev, "failed to handle node %pOFn: %d\n",
- node, error);
+ if (error)
goto err_out;
- }
error = rockchip_pm_add_subdomain(pmu, node);
- if (error < 0) {
- if (error != -EPROBE_DEFER)
- dev_err(dev, "failed to handle subdomain node %pOFn: %d\n",
- node, error);
+ if (error < 0)
goto err_out;
- }
/* A domain left on is not fatal; carry on with the others. */
rockchip_pm_power_off_subtree(pmu, node);
--
2.55.0
prev parent reply other threads:[~2026-11-26 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 10:01 [PATCH 0/3] pmdomain: rockchip: probe error clean-ups Arun Iyengar via B4 Relay
2026-11-26 10:01 ` [PATCH 1/3] pmdomain: rockchip: keep the pm_qos regmap error code Arun Iyengar via B4 Relay
2026-11-26 10:01 ` [PATCH 2/3] pmdomain: rockchip: use dev_err_probe() in the probe path Arun Iyengar via B4 Relay
2026-11-26 10:01 ` Arun Iyengar via B4 Relay [this message]
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=20261126-pmdomain-rockchip-cleanup-v1-3-a19f5ea7d555@gmail.com \
--to=devnull+aiyengar1990.gmail.com@kernel.org \
--cc=aiyengar1990@gmail.com \
--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=me@ziyao.cc \
--cc=sebastian.reichel@collabora.com \
--cc=shawn.lin@rock-chips.com \
--cc=ulfh@kernel.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
all inboxes | Powered by JetHome®