summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_virthub.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-04-10 23:55:49 +0400
committerFelipe Balbi <balbi@ti.com>2013-05-28 20:22:25 +0400
commit6c5f6a6f532ad3c14fbed04b6f2dd0e0cab1a143 (patch)
treeff0e5004f0c13e207c811f62afdaa967bcc640cd /drivers/usb/musb/musb_virthub.c
parent9ad96e694c3d33465d099d0a2db1aae8cb358d1f (diff)
downloadlinux-6c5f6a6f532ad3c14fbed04b6f2dd0e0cab1a143.tar.xz
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>
Diffstat (limited to 'drivers/usb/musb/musb_virthub.c')
-rw-r--r--drivers/usb/musb/musb_virthub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index 47ee430a13c9..104d22f7142d 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -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;