diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-21 18:26:49 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-21 18:26:49 +0300 |
commit | a74a5a3381c0f600d390e3997976c4ddf31417ab (patch) | |
tree | 74f6a5d328f8d0f5026db63d5760c355bf938cc5 /drivers/cpuidle/dt_idle_states.c | |
parent | fc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff) | |
parent | 18f95a3640dbf421ab9532e517070a0c1cd4d582 (diff) | |
download | linux-a74a5a3381c0f600d390e3997976c4ddf31417ab.tar.xz |
Merge branch 'cpuidle/3.19' of http://git.linaro.org/git-ro/people/daniel.lezcano/linux into pm-cpuidle
Pull ARM cpuidle material for 3.19-rc1 from Daniel Lezcano.
* 'cpuidle/3.19' of http://git.linaro.org/git-ro/people/daniel.lezcano/linux:
drivers: cpuidle: Remove cpuidle-arm64 duplicate error messages
drivers: cpuidle: Add idle-state-name description to ARM idle states
drivers: cpuidle: Add status property to ARM idle states
Diffstat (limited to 'drivers/cpuidle/dt_idle_states.c')
-rw-r--r-- | drivers/cpuidle/dt_idle_states.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c index 52f4d11bbf3f..5301912cb84e 100644 --- a/drivers/cpuidle/dt_idle_states.c +++ b/drivers/cpuidle/dt_idle_states.c @@ -27,6 +27,7 @@ static int init_state_node(struct cpuidle_state *idle_state, { int err; const struct of_device_id *match_id; + const char *desc; match_id = of_match_node(matches, state_node); if (!match_id) @@ -73,6 +74,10 @@ static int init_state_node(struct cpuidle_state *idle_state, return -EINVAL; } + err = of_property_read_string(state_node, "idle-state-name", &desc); + if (err) + desc = state_node->name; + idle_state->flags = CPUIDLE_FLAG_TIME_VALID; if (of_property_read_bool(state_node, "local-timer-stop")) idle_state->flags |= CPUIDLE_FLAG_TIMER_STOP; @@ -82,7 +87,7 @@ static int init_state_node(struct cpuidle_state *idle_state, * and desc become string pointers */ strncpy(idle_state->name, state_node->name, CPUIDLE_NAME_LEN - 1); - strncpy(idle_state->desc, state_node->name, CPUIDLE_DESC_LEN - 1); + strncpy(idle_state->desc, desc, CPUIDLE_DESC_LEN - 1); return 0; } @@ -169,6 +174,9 @@ int dt_init_idle_driver(struct cpuidle_driver *drv, if (!state_node) break; + if (!of_device_is_available(state_node)) + continue; + if (!idle_state_valid(state_node, i, cpumask)) { pr_warn("%s idle state not valid, bailing out\n", state_node->full_name); |