aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLina Iyer <[email protected]>2019-10-10 12:01:48 +0200
committerUlf Hansson <[email protected]>2020-01-02 16:50:08 +0100
commit778f173eb4528a6b48ff6a8600515899de75333c (patch)
treeef2f77c7f6a731221f7028797241421b21aaaaf7
parentb9f8c26afc405a4a616e765e949bdd551151e41d (diff)
cpuidle: dt: Support hierarchical CPU idle states
Currently CPU's idle states are represented using the flattened model. Let's add support for the hierarchical layout, via converting to use of_get_cpu_state_node(). Suggested-by: Sudeep Holla <[email protected]> Signed-off-by: Lina Iyer <[email protected]> Reviewed-by: Daniel Lezcano <[email protected]> Co-developed-by: Ulf Hansson <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]>
-rw-r--r--drivers/cpuidle/dt_idle_states.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index d06d21a9525d..252f2a9686a6 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -111,8 +111,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;
@@ -170,7 +169,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;