cpuidle: Export target residency
Antti P Miettinen [Mon, 29 Oct 2012 12:37:31 +0000 (14:37 +0200)]
Make cpuidle state target residency visible via sysfs.

Change-Id: Ie039bcfa943bdb4aca6cb30ac23356e4b48aa32b
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/159543
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

drivers/cpuidle/sysfs.c

index 6c4166a..2e384d7 100644 (file)
@@ -269,6 +269,7 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, \
 
 define_show_state_function(exit_latency)
 define_show_state_function(power_usage)
+define_show_state_function(target_residency)
 define_show_state_ull_function(usage)
 define_show_state_ull_function(time)
 define_show_state_str_function(name)
@@ -280,6 +281,7 @@ define_one_state_ro(name, show_state_name);
 define_one_state_ro(desc, show_state_desc);
 define_one_state_ro(latency, show_state_exit_latency);
 define_one_state_ro(power, show_state_power_usage);
+define_one_state_ro(residency, show_state_target_residency);
 define_one_state_ro(usage, show_state_usage);
 define_one_state_ro(time, show_state_time);
 define_one_state_rw(disabled, show_state_disabled, store_state_disabled);
@@ -289,6 +291,7 @@ static struct attribute *cpuidle_state_default_attrs[] = {
        &attr_desc.attr,
        &attr_latency.attr,
        &attr_power.attr,
+       &attr_residency.attr,
        &attr_usage.attr,
        &attr_time.attr,
        &attr_disabled.attr,