From: Grazvydas Ignotas Date: Mon, 25 Feb 2013 22:27:17 +0000 (+0200) Subject: usb: otg: twl4030-usb: don't switch the phy on/off needlessly X-Git-Tag: sz_154~28 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=c91286a490a8b02ebd852e24a7c9fda9d37aa43d usb: otg: twl4030-usb: don't switch the phy on/off needlessly 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. --- diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 8da8508281e1..f5904763ac9f 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -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. */ - 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);