usb: otg: twl4030-usb: don't switch the phy on/off needlessly
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 Feb 2013 22:27:17 +0000 (00:27 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 12 Mar 2013 21:45:53 +0000 (23:45 +0200)
With runtime_pm in place there is no longer need to turn the phy
on/off in OTG layer on cable connect/disconnect, OMAP glue does
this through otg.set_suspend() callback already. This will save power
when cable is connected but no gadget driver is loaded.

This will also have side effect of automatic USB charging no longer
working without twl4030_charger driver, so be sure to enable it if
charging is needed.

drivers/usb/otg/twl4030-usb.c

index 8da8508..f590476 100644 (file)
@@ -556,11 +556,6 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
                 * USB_LINK_VBUS state.  musb_hdrc won't care until it
                 * starts to handle softconnect right.
                 */
                 * USB_LINK_VBUS state.  musb_hdrc won't care until it
                 * starts to handle softconnect right.
                 */
-               if (status == USB_EVENT_NONE)
-                       twl4030_phy_suspend(twl, 0);
-               else
-                       twl4030_phy_resume(twl);
-
                if (status != status_old)
                        atomic_notifier_call_chain(&twl->otg.notifier, status,
                                twl->otg.gadget);
                if (status != status_old)
                        atomic_notifier_call_chain(&twl->otg.notifier, status,
                                twl->otg.gadget);