summaryrefslogtreecommitdiff
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2012-07-11 11:09:28 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 17:42:15 -0700
commit925aa46ba963a4da6d8ee6ab1d04a02ffa8db62b (patch)
tree80e3824524271b1a7abc584e7baba928b3b1f99b /drivers/usb/core
parent0d5ff306582834e3172365d619ec0cfe7a4f79ba (diff)
USB: notify phy when root hub port connect change
Phy may need to change settings when port connect change. Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Tested-by: Subodh Nijsure <snijsure@grid-net.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/hub.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 3febe54883b..540f20bf9e2 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -20,6 +20,7 @@
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <linux/usb/hcd.h>
+#include <linux/usb/otg.h>
#include <linux/usb/quirks.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
@@ -4101,6 +4102,13 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
}
}
+ if (hcd->phy && !hdev->parent) {
+ if (portstatus & USB_PORT_STAT_CONNECTION)
+ usb_phy_notify_connect(hcd->phy, port1);
+ else
+ usb_phy_notify_disconnect(hcd->phy, port1);
+ }
+
/* Return now if debouncing failed or nothing is connected or
* the device was "removed".
*/