From: Sarah Sharp Date: Sat, 22 Dec 2007 00:54:15 +0000 (-0800) Subject: USB: Export suspend statistics X-Git-Tag: v2.6.25-rc1~1075^2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1512300689426cb98bfd7e567ee9fdfaaf61b7c7;p=pandora-kernel.git USB: Export suspend statistics This patch exports two statistics to userspace: /sys/bus/usb/device/.../power/connected_duration /sys/bus/usb/device/.../power/active_duration connected_duration is the total time (in msec) that the device has been connected. active_duration is the total time the device has not been suspended. With these two statistics, tools like PowerTOP can calculate the percentage time that a device is active, i.e. not suspended or auto-suspended. Users can also use the active_duration to check if a device is actually autosuspended. Currently, they can set power/level to auto and power/autosuspend to a positive timeout, but there's no way to know from userspace if a device was actually autosuspended without looking at the dmesg output. These statistics will be useful in creating an automated userspace script to test autosuspend for USB devices. Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed