summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Jiejing <jiejing.zhang@freescale.com>2010-11-25 12:56:04 +0800
committerZhang Jiejing <jiejing.zhang@freescale.com>2010-11-30 12:54:47 +0800
commit976be1ff478c98856e771d0e6165fa530968f926 (patch)
treec90fbb16dbc18d5731bf2b9c03027930acd54eae
parentb70f3502d624ef1a47dc9218746088c0f2afb5a7 (diff)
ENGR00134043-1: PM: change device suspend time debug driver to default off.
the default state of suspend driver is default off, if you want to debug the suspend time, echo time in microsecond(u Second) to /sys/powe/device_suspend_time_threshold eg: I want to know which driver suspend & resume takes more that 0.5 ms (500 us), you can just : ehco 500 > /sys/power/device_suspend_time_threshold Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
-rw-r--r--kernel/power/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 0b9497851a9a..bfb684a4d412 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -234,13 +234,17 @@ power_attr(pm_trace);
* threshold of device suspend time consumption in microsecond(0.5ms), the
* driver suspend/resume time longer than this threshold will be
* print to console, 0 to disable */
-int device_suspend_time_threshold = 500;
+int device_suspend_time_threshold;
static ssize_t
device_suspend_time_threshold_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
- return sprintf(buf, "%d\n", device_suspend_time_threshold);
+ if (device_suspend_time_threshold == 0)
+ return sprintf(buf, "off\n");
+ else
+ return sprintf(buf, "%d usecs\n",
+ device_suspend_time_threshold);
}
static ssize_t