linux/drivers/base
ShuoX Liu 2a77c46de1 PM / Suspend: Add statistics debugfs file for suspend to RAM
Record S3 failure time about each reason and the latest two failed
devices' names in S3 progress.
We can check it through 'suspend_stats' entry in debugfs.

The motivation of the patch:

We are enabling power features on Medfield. Comparing with PC/notebook,
a mobile enters/exits suspend-2-ram (we call it s3 on Medfield) far
more frequently. If it can't enter suspend-2-ram in time, the power
might be used up soon.

We often find sometimes, a device suspend fails. Then, system retries
s3 over and over again. As display is off, testers and developers
don't know what happens.

Some testers and developers complain they don't know if system
tries suspend-2-ram, and what device fails to suspend. They need
such info for a quick check. The patch adds suspend_stats under
debugfs for users to check suspend to RAM statistics quickly.

If not using this patch, we have other methods to get info about
what device fails. One is to turn on  CONFIG_PM_DEBUG, but users
would get too much info and testers need recompile the system.

In addition, dynamic debug is another good tool to dump debug info.
But it still doesn't match our utilization scenario closely.
1) user need write a user space parser to process the syslog output;
2) Our testing scenario is we leave the mobile for at least hours.
   Then, check its status. No serial console available during the
   testing. One is because console would be suspended, and the other
   is serial console connecting with spi or HSU devices would consume
   power. These devices are powered off at suspend-2-ram.

Signed-off-by: ShuoX Liu <shuox.liu@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-10-16 23:27:45 +02:00
..
power PM / Suspend: Add statistics debugfs file for suspend to RAM 2011-10-16 23:27:45 +02:00
regmap Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regmap 2011-09-08 16:47:52 -07:00
attribute_container.c [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init 2010-03-27 15:15:24 -04:00
base.h PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
bus.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-01-13 10:05:56 -08:00
class.c driver-core: merge private parts of class and bus 2010-11-17 14:21:08 -08:00
core.c drivers/base/core.c: Fixed brace coding style issue. 2011-04-22 17:06:30 -07:00
cpu.c drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline 2010-05-21 09:37:28 -07:00
dd.c Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-05-19 18:24:11 -07:00
devres.c base/devres.c: quiet sparse noise about context imbalance 2011-08-22 14:12:24 -07:00
devtmpfs.c drivers/base/devtmpfs.c: correct annotation of `setup_done' 2011-08-08 13:53:50 -07:00
dma-coherent.c Driver core: internal struct dma_coherent_mem, change type of a member. 2010-08-05 13:53:33 -07:00
dma-mapping.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
driver.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
firmware.c
firmware_class.c firmware loader: allow builtin firmware load even if usermodehelper is disabled 2011-08-24 15:55:30 -07:00
hypervisor.c
init.c Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev 2009-09-15 09:50:49 -07:00
isa.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
Kconfig Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2011-07-25 23:06:24 -07:00
Makefile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap 2011-07-23 11:14:47 -07:00
map.c
memory.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
module.c driver core: module.c: Use kasprintf 2010-05-21 09:37:29 -07:00
node.c mm: per-node vmstat: show proper vmstats 2011-05-25 08:39:07 -07:00
platform.c driver core: fix kernel-doc warning in platform.c 2011-08-08 13:53:49 -07:00
sys.c PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
syscore.c PM: Reintroduce dropped call to check_wakeup_irqs 2011-07-11 10:51:49 +02:00
topology.c topology/sysfs: Provide book id and siblings attributes 2010-09-09 20:41:25 +02:00
transport_class.c