]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/musb/ux500.c
usb: move the OTG state from the USB PHY to the OTG structure
[karo-tx-linux.git] / drivers / usb / musb / ux500.c
index d0180a70051de6695461eef8819aae72d6b4cbc1..1d631d5f4a27bb26d56071c8de5c82b327781859 100644 (file)
@@ -56,7 +56,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
        devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
 
        if (is_on) {
-               if (musb->xceiv->state == OTG_STATE_A_IDLE) {
+               if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) {
                        /* start the session */
                        devctl |= MUSB_DEVCTL_SESSION;
                        musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
@@ -76,7 +76,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
                } else {
                        musb->is_active = 1;
                        musb->xceiv->otg->default_a = 1;
-                       musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+                       musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE;
                        devctl |= MUSB_DEVCTL_SESSION;
                        MUSB_HST_MODE(musb);
                }
@@ -102,7 +102,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
                mdelay(200);
 
        dev_dbg(musb->controller, "VBUS %s, devctl %02x\n",
-               usb_otg_state_string(musb->xceiv->state),
+               usb_otg_state_string(musb->xceiv->otg->state),
                musb_readb(musb->mregs, MUSB_DEVCTL));
 }
 
@@ -112,7 +112,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
        struct musb *musb = container_of(nb, struct musb, nb);
 
        dev_dbg(musb->controller, "musb_otg_notifications %ld %s\n",
-                       event, usb_otg_state_string(musb->xceiv->state));
+                       event, usb_otg_state_string(musb->xceiv->otg->state));
 
        switch (event) {
        case UX500_MUSB_ID:
@@ -127,7 +127,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
                if (is_host_active(musb))
                        ux500_musb_set_vbus(musb, 0);
                else
-                       musb->xceiv->state = OTG_STATE_B_IDLE;
+                       musb->xceiv->otg->state = OTG_STATE_B_IDLE;
                break;
        default:
                dev_dbg(musb->controller, "ID float\n");