From: Maulik Shah <maulik.shah@oss.qualcomm.com>
To: Ulf Hansson <ulfh@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Maulik Shah <maulik.shah@oss.qualcomm.com>
Subject: [PATCH] pmdomain: core: Fall back to node name for idle states
Date: Mon, 14 Sep 2026 12:24:25 +0530 [thread overview]
Message-ID: <20260914-pmdomain-idle-state-name-fallback-v1-1-e4242c409a0b@oss.qualcomm.com> (raw)
The dt_idle_states uses idle-state-name when available and when missing
falls back to the node name. Do the same for domain-idle-states.
This lets pmdomain idle_states_desc debugfs show a name even when
idle-state-name is omitted.
Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
---
drivers/pmdomain/core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index 052ec478dfcc..d0bcb4897477 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -3583,7 +3583,10 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
if (!err)
genpd_state->residency_ns = 1000LL * residency;
- of_property_read_string(state_node, "idle-state-name", &genpd_state->name);
+ err = of_property_read_string(state_node, "idle-state-name",
+ &genpd_state->name);
+ if (err)
+ genpd_state->name = state_node->name;
genpd_state->power_on_latency_ns = 1000LL * exit_latency;
genpd_state->power_off_latency_ns = 1000LL * entry_latency;
@@ -4006,7 +4009,7 @@ static int idle_states_desc_show(struct seq_file *s, void *data)
snprintf(state_name, ARRAY_SIZE(state_name), "S%-5d", i);
seq_printf(s, "%-6s %-12llu %-14llu %s\n",
state_name, latency, residency,
- state->name ?: "N/A");
+ state->name);
}
genpd_unlock(genpd);
---
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
change-id: 20260914-pmdomain-idle-state-name-fallback-3bb5db520a30
Best regards,
--
Maulik Shah <maulik.shah@oss.qualcomm.com>
next reply other threads:[~2026-09-14 6:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 6:54 Maulik Shah [this message]
2026-09-14 7:49 ` Abel Vesa
2026-09-14 12:37 ` Konrad Dybcio
2026-09-21 14:33 ` Ulf Hansson
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=20260914-pmdomain-idle-state-name-fallback-v1-1-e4242c409a0b@oss.qualcomm.com \
--to=maulik.shah@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--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®