* [PATCH] pmdomain: core: Fall back to node name for idle states
@ 2026-09-14 6:54 Maulik Shah
2026-09-14 7:49 ` Abel Vesa
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Maulik Shah @ 2026-09-14 6:54 UTC (permalink / raw)
To: Ulf Hansson; +Cc: linux-pm, linux-arm-msm, linux-kernel, Maulik Shah
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pmdomain: core: Fall back to node name for idle states
2026-09-14 6:54 [PATCH] pmdomain: core: Fall back to node name for idle states Maulik Shah
@ 2026-09-14 7:49 ` Abel Vesa
2026-09-14 12:37 ` Konrad Dybcio
2026-09-21 14:33 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Abel Vesa @ 2026-09-14 7:49 UTC (permalink / raw)
To: Maulik Shah; +Cc: Ulf Hansson, linux-pm, linux-arm-msm, linux-kernel
On 26-09-14 12:24:25, Maulik Shah wrote:
> 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>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pmdomain: core: Fall back to node name for idle states
2026-09-14 6:54 [PATCH] pmdomain: core: Fall back to node name for idle states Maulik Shah
2026-09-14 7:49 ` Abel Vesa
@ 2026-09-14 12:37 ` Konrad Dybcio
2026-09-21 14:33 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2026-09-14 12:37 UTC (permalink / raw)
To: Maulik Shah, Ulf Hansson; +Cc: linux-pm, linux-arm-msm, linux-kernel
On 9/14/26 8:54 AM, Maulik Shah wrote:
> 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.
These are often 'idle-state-N', so I'm not sure there's much value
(but certainly don't treat that as a nack)
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pmdomain: core: Fall back to node name for idle states
2026-09-14 6:54 [PATCH] pmdomain: core: Fall back to node name for idle states Maulik Shah
2026-09-14 7:49 ` Abel Vesa
2026-09-14 12:37 ` Konrad Dybcio
@ 2026-09-21 14:33 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2026-09-21 14:33 UTC (permalink / raw)
To: Maulik Shah; +Cc: Ulf Hansson, linux-pm, linux-arm-msm, linux-kernel
On Mon, Sep 14, 2026 at 8:54 AM Maulik Shah
<maulik.shah@oss.qualcomm.com> wrote:
>
> 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);
As pointed out by Sashiko, state->name may still be NULL in some
cases, so I decided to keep this as is.
> }
>
> genpd_unlock(genpd);
>
> ---
> base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
> change-id: 20260914-pmdomain-idle-state-name-fallback-3bb5db520a30
>
> Best regards,
> --
> Maulik Shah <maulik.shah@oss.qualcomm.com>
>
With the minor amendment above, applied for next, thanks!
Kind regards
Uffe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-21 14:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 6:54 [PATCH] pmdomain: core: Fall back to node name for idle states Maulik Shah
2026-09-14 7:49 ` Abel Vesa
2026-09-14 12:37 ` Konrad Dybcio
2026-09-21 14:33 ` Ulf Hansson
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®