Re: Tool to enable USB power management

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

 



On Wed, 25 Feb 2009, Sarah Sharp wrote:

> On Wed, Feb 25, 2009 at 09:50:20PM +0200, Alan Stern wrote:
> > On Wed, 25 Feb 2009, Sarah Sharp wrote:
> > 
> > > > Does your tool also test remote wakeup?  In many cases selective 
> > > > suspend is useless without it.

> Sure.  I guess I don't see why selective suspend would be useless
> without remote wakeup.  For example, my USB camera on my eeepc doesn't
> have remote wakeup, but it auto-suspends fine.  When I'm not using it, I
> want it to be auto-suspended.

I said "in many cases" selective suspend is useless without remote 
wakeup.  Consider a USB keyboard as a good example.


> > Of course, some devices don't work at all after resuming, but that's a 
> > separate matter.  Which reminds me: There is a quirks flag for devices 
> > which always require a reset after a resume.  Your tool could test for 
> > this requirement.  If the device doesn't work right away after 
> > resuming, but it does work after a reset, then it should have the 
> > RESET_RESUME quirk.
> 
> Sure, the tool could set the RESET_RESUME quirk and re-test if the
> device doesn't work after a host-initiated resume.  Would the tool have
> to reload the USB core?

Heh -- it would have to _recompile_ and reload usbcore.  See below...

>  Or just the driver for that device?  I'm
> unclear how to dynamically add quirks flags, and
> Documentation/usb/hotplug.txt isn't much help.  I can see that I have a
> modules.usbmap in /lib/modules/2.6.xx/ but that doesn't seem to have any
> of the PID:VIDs listed as needing reset resume in
> drivers/usb/core/quirks.c.

Currently there is no way to modify dynamically either the global
quirks table or the quirks flags for a particular device.  The "quirks"
attribute has a show method but not a set method; it wouldn't be hard
to write one.

> Ok, it sounds like I need some specific prompts to the user as to how
> they need to test their HID device.

Or any device in general.

> The gitweb on moblin.org does provide compressed versions of the latest
> commit on a tree.  Pick your format of choice:
> 
> http://git.moblin.org/cgit.cgi/usb-pm-tool/snapshot/usb-pm-tool-master.zip
> http://git.moblin.org/cgit.cgi/usb-pm-tool/snapshot/usb-pm-tool-master.tar.gz
> http://git.moblin.org/cgit.cgi/usb-pm-tool/snapshot/usb-pm-tool-master.tar.bz2
> 
> These don't work with wget, but you can download them from a browser.
> Eventually want to package USB PM tool for distros, but it needs more
> testing (and the ability for a user to send a report in an automated
> fashion) before I start pushing it out.

Great!

Alan Stern

--
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