Am Mittwoch, 16. Mai 2007 11:48 schrieb Jiri Kosina: > On Wed, 16 May 2007, Robert Marquardt wrote: > > > > just a quick immediate note - I just tested it on my testing box, and > > > it doesn't seem to work for me - the USB keyboard still seems to be > > > awake (leds are on), even if I echo 0 into 'autosuspend' file in sysfs > > > in order to suspend it immediately. > > Ah, that was nagging me. Is it at all possible to suspend a keyboard if > > you want to have the LEDs always in sync with their state? A suspended > > bus-powered USB device cannot drive LEDs so suspending an USB keyboard > > with CAPS LOCK on means it gets out of sync. > > I don't think that there is a better approach than what Oliver's code is > currently doing - i.e. if the keyboard goes to sleep, queue the output > reports which would change the state of the leds, and send them either > when the keyboard wakes up, or when the queue is too long. Or we can > simply just make any output report wake the device up.
Actually, there's currently a race in the code that can trigger if you have multiple keyboards. Suppose the system is going to hibernate. One keyboard is suspended and the other is not yet. You hit a key causing an LED message and the queue reaches the threshold. You'd have active DMA while a snapshot is done. > So this is going to make the leds state consistent as soon as the keyboard > is woken up. > > This is also a reason why this is not going to fly with PID devices - we > really want the force feedback to happen immediately, for example. It is my understanding that a PID effect can be active long after the message went out to the device. Is that correct? Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel