usb: musb: use musb->port_mode
Initialize the host and gadget subsystems of the musb driver only when the appropriate mode is selected from platform data, or device-tree information, respectively. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:

committed by
Felipe Balbi

parent
9ad96e694c
commit
6c5f6a6f53
@@ -79,7 +79,8 @@ static void musb_start(struct musb *musb)
|
||||
* (b) vbus present/connect IRQ, peripheral mode;
|
||||
* (c) peripheral initiates, using SRP
|
||||
*/
|
||||
if ((devctl & MUSB_DEVCTL_VBUS) == MUSB_DEVCTL_VBUS) {
|
||||
if (musb->port_mode != MUSB_PORT_MODE_HOST &&
|
||||
(devctl & MUSB_DEVCTL_VBUS) == MUSB_DEVCTL_VBUS) {
|
||||
musb->is_active = 1;
|
||||
} else {
|
||||
devctl |= MUSB_DEVCTL_SESSION;
|
||||
|
Reference in New Issue
Block a user