Thread (74 messages) 74 messages, 7 authors, 2018-11-20
STALE2760d
Revisions (4)
  1. v6 [diff vs current]
  2. v7 [diff vs current]
  3. v8 current
  4. v10 [diff vs current]

[PATCH v8 12/26] cpuidle: dt: Support hierarchical CPU idle states

From: Ulf Hansson <hidden>
Date: 2018-06-20 17:27:05
Also in: linux-arm-msm, linux-pm, lkml
Subsystem: cpu idle time management framework, the rest · Maintainers: "Rafael J. Wysocki", Daniel Lezcano, Linus Torvalds

From: Lina Iyer <redacted>

Currently CPU's idle states are represented in a flattened model, via the
"cpu-idle-states" binding from within the CPU's device nodes.

Support the hierarchical layout during parsing and validating of the CPU's
idle states. This is simply done by calling the new OF helper,
of_get_cpu_state_node().

Cc: Lina Iyer <redacted>
Suggested-by: Sudeep Holla <redacted>
Signed-off-by: Lina Iyer <redacted>
Co-developed-by: Ulf Hansson <redacted>
Signed-off-by: Ulf Hansson <redacted>
---
 drivers/cpuidle/dt_idle_states.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 53342b7f1010..13f9b7cd32d1 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -118,8 +118,7 @@ static bool idle_state_valid(struct device_node *state_node, unsigned int idx,
 	for (cpu = cpumask_next(cpumask_first(cpumask), cpumask);
 	     cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpumask)) {
 		cpu_node = of_cpu_device_node_get(cpu);
-		curr_state_node = of_parse_phandle(cpu_node, "cpu-idle-states",
-						   idx);
+		curr_state_node = of_get_cpu_state_node(cpu_node, idx);
 		if (state_node != curr_state_node)
 			valid = false;
 
@@ -176,7 +175,7 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
 	cpu_node = of_cpu_device_node_get(cpumask_first(cpumask));
 
 	for (i = 0; ; i++) {
-		state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
+		state_node = of_get_cpu_state_node(cpu_node, i);
 		if (!state_node)
 			break;
 
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help