forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
a2396a32b8
commit
d4c433fe6f
@ -1731,6 +1731,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
|
|||||||
spin_lock_irqsave(&musb->lock, flags);
|
spin_lock_irqsave(&musb->lock, flags);
|
||||||
|
|
||||||
otg_set_peripheral(musb->xceiv, &musb->g);
|
otg_set_peripheral(musb->xceiv, &musb->g);
|
||||||
|
musb->xceiv->state = OTG_STATE_B_IDLE;
|
||||||
musb->is_active = 1;
|
musb->is_active = 1;
|
||||||
|
|
||||||
/* FIXME this ignores the softconnect flag. Drivers are
|
/* FIXME this ignores the softconnect flag. Drivers are
|
||||||
|
Loading…
Reference in New Issue
Block a user