usb: otg: twl4030-usb: delay status read sz_154
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 23 Mar 2013 00:47:28 +0000 (02:47 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 23 Mar 2013 01:17:13 +0000 (03:17 +0200)
On CC pandora after host cable replug, not only ID but also VBUS bit
gets set for whatever reason too (this is not the case on 1GHz).
What's even worse, on ID bit is even delayed and is_driving_vbus()
won't work because PHY is off, so the driver wrongly thinks VBUS
is suppled by something.

Must delay HW_CONDITIONS read to avoid this..

drivers/usb/otg/twl4030-usb.c

index 1527f70..296e553 100644 (file)
@@ -285,6 +285,7 @@ static enum usb_xceiv_events twl4030_usb_linkstat(struct twl4030_usb *twl)
         * signal is active, the OTG module is activated, and
         * its interrupt may be raised (may wake the system).
         */
         * signal is active, the OTG module is activated, and
         * its interrupt may be raised (may wake the system).
         */
+       msleep(50);
        status = twl4030_readb(twl, TWL4030_MODULE_PM_MASTER,
                        STS_HW_CONDITIONS);
        if (status < 0)
        status = twl4030_readb(twl, TWL4030_MODULE_PM_MASTER,
                        STS_HW_CONDITIONS);
        if (status < 0)