Re: Difference between run time and normal suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi alan:

2015-01-06 8:39 GMT+08:00 vichy <vichy.kuo@xxxxxxxxx>:
> 2015-01-05 23:40 GMT+08:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
>> On Mon, 5 Jan 2015, vichy wrote:
>>
>>> hi all:
>>> after tracing and reading kernel usb source code about run time and
>>> normal suspend.
>>> 1. how could we check the rum time suspend is work on some device?
>>>     By plugging in devices and check whether
>>> /sys/bus/usb/devices/.../power/ is empty or not?
>>
>> No.  That directory will never be empty.
>>
>> You can check whether runtime suspend works by enabling it:
>>
>>         echo auto >/sys/bus/usb/devices/.../power/control
>>
>> You can see whether the device has been suspended by looking at the
>> runtime_status and runtime_suspended_time files in the .../power
>> directory.
>>
I use keyboard, it should be default support runtime suspend, for
testing runtime suspend like the attach log.
insert related modules, change related suspend parameters.

But I cannot see the keyboard go to suspend even I force autosuspend as 0.
is there any other way to trigger runtime suspend immediately instead
of waiting kernel judge it is idle for a while?

appreciate your help in advance,
#> lsmod
    Not tainted
usbhid 21486 0 - Live 0xbe4a3000
hid_generic 954 0 - Live 0xbe49f000
hid 72898 2 usbhid,hid_generic, Live 0xbe487000
usb_storage 43962 0 - Live 0xbe473000
ehci_hcd 60249 0 - Live 0xbe45e000
xhci_hcd 92188 0 - Live 0xbe441000
usbcore 182850 4 usbhid,usb_storage,ehci_hcd,xhci_hcd, Live 0xbe404000
usb_common 1822 1 usbcore, Live 0xbe400000
#> 
#> [0-57.0178] usb 6-1: new low-speed USB device number 3 using platform-ehci
[0-57.1687] usb 6-1: New USB device found, idVendor=04ca, idProduct=002f
[0-57.1752] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[0-57.1821] usb 6-1: Product: USB Multimedia Keyboard
[0-57.1869] usb 6-1: Manufacturer: Lite-On Technology Corp.
[0-57.2035] input: Lite-On Technology Corp. USB Multimedia Keyboard as /devices/fc1a0000.ehci/usb6/6-1/6-1:1.0/input/input0
[0-57.2152] hid-generic 0003:04CA:002F.0001: input: USB HID v1.10 Keyboard [Lite-On Technology Corp. USB Multimedia Keyboard] on usb-platform-1/input0
[0-57.2409] input: Lite-On Technology Corp. USB Multimedia Keyboard as /devices/fc1a0000.ehci/usb6/6-1/6-1:1.1/input/input1
[0-57.2522] hid-generic 0003:04CA:002F.0002: input: USB HID v1.10 Device [Lite-On Technology Corp. USB Multimedia Keyboard] on usb-platform-1/input1

#> 
#> cat /sys/bus/usb/devices/6-1/power/control 
on
#> echo auto > /sys/bus/usb/devices/6-1/power/control
#> echo 0 > /sys/bus/usb/devices/6-1/power/autosuspend
#> cat /sys/bus/usb/devices/6-1/power/
active_duration         runtime_active_time     wakeup_count
autosuspend             runtime_status          wakeup_expire_count
autosuspend_delay_ms    runtime_suspended_time  wakeup_last_time_ms
connected_duration      wakeup                  wakeup_max_time_ms
control                 wakeup_abort_count      wakeup_total_time_ms
level                   wakeup_active
persist                 wakeup_active_count
#> cat /sys/bus/usb/devices/6-1/power/runtime_status 
active
#> cat /sys/bus/usb/devices/6-1/power/runtime_suspended_time 
0
#> 

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux