Re: Question on Linux USB driver's power management

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

 



Thanks Oliver Neukum!You solved lots of puzzle in my mind!!
Some further questions:

Q5: I still can't fully understand how autosuspension saving power. If
a device driver only saves the device state and do not fill any
device's physical registering to communicate with device, (hi, please
sleep), then suspend() return ok .  I guess the HW device should
continue to consume power as normarlly, since HW device knows nothing
about the suspension request from host system. Is it mean there are
some physical power supply change in USB bus for autosuspension
callback?  Or autosuspend means a special USB package broadcast in USB
bus after suspend() callback return, USB device who received it must
do some power saving work per USB SPEC?

Q6: Does it mean the most power-optimal usb system is: everything
marked it can be autosuspend, including hubs and usb devices? there
isn't any squeeze potential for usb power any more?

Q7: A more specific question is: If a device running on Linux is
already enabled autosuspend and idle now, while it is physically
consumes more power than running on Windows when idle. Is there
anything known issue can cause this power difference? Is there any
know advantage for USB windows power management, e.g for more mechnism
than autosuspend?


Thanks again!

Samuel
2010/6/30 Oliver Neukum <oneukum@xxxxxxx>:
> Am Mittwoch, 30. Juni 2010, 11:04:58 schrieb Samuel Xu:
>> Appreciate any USB power expert can help me on those Linux USB power
>> management puzzles:
>>
>> Q1: I found some USB material mentioned : Relationship between ACPI
>> Dx(e.g. D0/D1/D3) states and USB PM states (active/suspended) is
>> orthogonal.
>
> Almost. The root hub must be in D0 unless it is suspended. But the root
> hub can be suspended only if all devices on the bus are suspended.
>
>> Suspend/resume might not effect device Dx state. Is it a correct
>> statement for general usb device?
>
> Yes.
>
>> Q2: How to tell USB device’s ACPI Dx state. It seems lsusb can’t tell
>> us those info. (lspci works for PCI device’s Dx state)
>
> USB devices don't have Dx states. Therefore you can't query them.
>
>> Q3: How to tell USB device’s suspension state?
>
> You don't. You can just query whether the device should autosuspend itself
> in /sys/bus/usb/devices/$DEVICE/power
>
>> will any query via urb
>> will cause resume of USB device?
>
> Yes.
>
>> Q4: should USB device driver response to do some device-specific power
>> action (e.g. device register writing) to put a specific USB device
>> into low power state when responding to suspend action?
>
> No. A driver should implement suspend()/resume() hooks that
> a) save device state if necessary
> b) make it safe to go into a suspended state
> c) cease communication
> (in suspend() )
>
> Please clarify the question.
>
>> Q5: If Q4 is Yes, should device vendor respond for those
>> device-specific code? will Linux kernel code typically incorporate
>> those device-specific code?
>
> There is nothing necessarily device specific in suspend()/resume()
> Please clarify the question.
>
>        HTH
>                Oliver
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux