]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00133978 PM: add time sensitive debug function to suspend & resume
authorZhang Jiejing <jiejing.zhang@freescale.com>
Mon, 22 Nov 2010 09:14:32 +0000 (17:14 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:32:30 +0000 (08:32 +0200)
commitbb0b1179f251f1cbb248533f7ae05baa4107687b
tree45c8275377e8d5cec7e0d49b53d2bbb0068a232e
parent9fa67fe4ebbacabfecca7fd3db62558f44789a9b
ENGR00133978 PM: add time sensitive debug function to suspend & resume

There was some driver is slow on suspend/resume,
but some embeded system like eReader,Cellphone
are time sensitive,this commit will report the slow
driver on suspend/resume, the default value is 500us(0.5ms)

Also, the threshold can be change by modify
'/sys/power/device_suspend_time_threshold' to change the threshold,
it is in microsecond.

The output is like:

PM: device platform:soc-audio.2 suspend too slow, takes          606.696 msecs
PM: device platform:mxc_sdc_fb.1 suspend too slow, takes         7.708 msecs

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>
drivers/base/power/main.c
drivers/base/power/power.h
kernel/power/Kconfig
kernel/power/main.c