Alan Stern wrote:
> Do it in your gadget driver's disconect() method. Just call
> vbus_draw(100). You need to know when disconnects occur anyway,
> because your driver has to reinitialize itself.
>
Yes, this seems like the right way to do things.
>> I was initially expecting that vbus_draw would be called with a mA value
>> of 100 or less when disconnecting but this doesn't seem to be the case.
>> I can't use vbus_session as we don't monitor vbus on our product. Is
>> there some other function that's likely to be called on disconnect that
>> can be used to trigger a reduction in current draw?
>>
>
> IMO it's a bug if the controller driver doesn't reduce the current draw
> back to 100 mA after a disconnect/reconnect cycle. (It also is up to
> the controller driver to reduce the draw during a USB suspend.)
>
That's why I was suprised vbus_draw wasn't being called on disconnect.
During suspend should it go to zero or is 100 mA still ok? While the
device may be off, the battery may still be charging.
> This bug may be present in many of the drivers. A little auditing
> would be in order.
>
If I get something satisfactory I'll look at adding in to the other drivers.
Justin.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[Home]
[Video for Linux]
[Photo]
[Yosemite Forum]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[Free Dating]