diff options
author | Arnaud Mandy <ext-arnaud.2.mandy@nokia.com> | 2009-12-15 13:29:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 11:34:17 -0800 |
commit | d4c433fe6f04195a1a0d2146d9f11ad45eecef86 (patch) | |
tree | 288a297d666b435dc960af7ff320c78115d4058c /drivers/usb | |
parent | a2396a32b848a9864f933ced860192c72c769aca (diff) | |
download | op-kernel-dev-d4c433fe6f04195a1a0d2146d9f11ad45eecef86.zip op-kernel-dev-d4c433fe6f04195a1a0d2146d9f11ad45eecef86.tar.gz |
USB: musb: gadget: set otg tranceiver to idle when registering gadget
When registering gadget driver, the state of the transceiver
must be set from undefined (no gadget) to b_idle.
Module unload sets the transceiver state to undefined state.
After the first load/unload pair, the reset irq will be lost.
Signed-off-by: Arnaud Mandy <ext-arnaud.2.mandy@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 0c36925..e164999 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1731,6 +1731,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) spin_lock_irqsave(&musb->lock, flags); otg_set_peripheral(musb->xceiv, &musb->g); + musb->xceiv->state = OTG_STATE_B_IDLE; musb->is_active = 1; /* FIXME this ignores the softconnect flag. Drivers are |