aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMantesh Sarasetti <mantesh@ti.com>2012-03-16 12:03:52 -0500
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:59:41 +0200
commitf4a029ae88373098cfcda9f267da8724d6e7d955 (patch)
tree07495eefc54b71b6269d15c713592795ebd6653c
parent8371cdaf33533cb7f27ca43a53e644f8f8df0370 (diff)
downloadkernel_samsung_tuna-f4a029ae88373098cfcda9f267da8724d6e7d955.zip
kernel_samsung_tuna-f4a029ae88373098cfcda9f267da8724d6e7d955.tar.gz
kernel_samsung_tuna-f4a029ae88373098cfcda9f267da8724d6e7d955.tar.bz2
OMAP: MUSB: Fix for issue when booting with USB charger connected
Issue: When the charger is disconnected after bootup, the device fails to go into OFF mode. Bug Details: 1. At the end of Gadget Driver probe pm_runtime_put()is not called in case of charger/USB cable connected during bootup. 2. After bootup when we disconnect the charger, the disconnect handler for USB_EVENT_NONE checks first if the disconnect was for charger. If yes it returns without autosuspend else it call pm_runtime_autosuspend. So because of this PM calls get imbalanced and system does not go to OFF. Fix: Logic at the end of the gadget probe function is fixed to prevent the above problem. Change-Id: Ief7daade9aed7460bd4d1d576c22024a419ddbda Signed-off-by: Mantesh Sarashetti <mantesh@ti.com> CC: Ruchika Kharwar <ruchika@ti.com> Conflicts: drivers/usb/musb/musb_gadget.c
-rwxr-xr-xdrivers/usb/musb/musb_gadget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6cf09f8..cb7852b 100755
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -2001,8 +2001,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
hcd->self.dma_align = 1;
}
-
- if (musb->xceiv->last_event == USB_EVENT_NONE) {
+ if ((musb->xceiv->last_event == USB_EVENT_NONE) ||
+ (musb->xceiv->last_event == USB_EVENT_CHARGER)) {
musb->xceiv->state = OTG_STATE_B_IDLE;
pm_runtime_put(musb->controller);
}