On Wed, 7 Mar 2007, Pandita, Vikram wrote: > I have a related query on USB suspend: > In Host mode, is there a way to force a SUSPEND/RESUME from the class driver > or application?
You can force a suspend from within the kernel. Suppose that udev is a struct usb_device you want to suspend. Then you can call: (udev->dev.bus->suspend)(&udev->dev); You can force a suspend from an application if your kernel has CONFIG_PM_SYSFS_DEPRECATED turned on. From the shell you can do: echo -n 2 >/sys/bus/usb/devices/.../power/state where "..." is the name of the device to suspend. A similar approach will work from within a program. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel