RE: [DISCUSSION] USB device remote wakeup is not working for S3 case

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

 



> There's a simple solution: Call device_set_wakeup_enable() for the device!
> You can do this from the command line by:
> 
> 	echo auto >/sys/bus/usb/devices/.../power/control
> 
> where the "..." is the pathname for your device.
> 
Yes, this can enable auto-suspend for usb device like a mouse. And remote wakeup
does work for RPM because rpm suspend refers to the needs_remote_wakeup flag.
But this doesn't impact system level suspend. The correct thing is:
	
	echo enabled >/sys/bus/usb/devices/.../power/wakeup

This will call device_set_wakeup_enable() for the device and should work. But 
unfortunately it seems didn't work even the wakeup file shows "enabled" which 
means the device is wakeup enabled(Tried on 3.16 & 3.18 kernel). This is a different
issue, I will check.

> 	if (interface->desc.bInterfaceSubClass ==
> USB_INTERFACE_SUBCLASS_BOOT &&
> 			interface->desc.bInterfaceProtocol ==
> 				USB_INTERFACE_PROTOCOL_KEYBOARD) {
> 		usbhid_set_leds(hid);
> 		device_set_wakeup_enable(&dev->dev, 1);
> 	}
> 
> How about leaving everything the way it is now?  If you want to enable
> wakeup for something like a USB mouse, you can write a udev script to do it
> as shown above.
> 
> Alan Stern

Could we also enable wakeup for usb mouse? Or is there any concern to enable it?
Per my opinion, most people may expect clicking mouse can awake system.

Regards,
Du, Changbin
--
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