atmel_usba_udc: Keep track of the device status
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 11 Oct 2007 20:40:30 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:35 +0000 (14:55 -0700)
commit58ed7b94d98245fbad54a0af7ea3317ab1dd6876
treecc5df430c9a4a152d8b264f9f0c613ed40a2c333
parentd466a9190ff1ceddfee50686e61d63590fc820d9
atmel_usba_udc: Keep track of the device status

Keep track of the device status (as returned by the GET_STATUS
request) and allow it to be manipulated by set_selfpowered() as
well as SET_FEATURE/CLEAR_FEATURE (for remote wakeup)

Implement the wakeup() op, which refuses to do anything if the
DEVICE_REMOTE_WAKEUP feature wasn't set by the host.  Now this
driver passes USBCV (at least, with gadget zero).

Fix one more locking bug; lockdep is every developer's friend.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/atmel_usba_udc.c
drivers/usb/gadget/atmel_usba_udc.h