diff options
author | Richard Zhao <richard.zhao@freescale.com> | 2012-07-10 23:09:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 20:42:15 -0400 |
commit | 925aa46ba963a4da6d8ee6ab1d04a02ffa8db62b (patch) | |
tree | 80e3824524271b1a7abc584e7baba928b3b1f99b /drivers/usb | |
parent | 0d5ff306582834e3172365d619ec0cfe7a4f79ba (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')
-rw-r--r-- | drivers/usb/core/hub.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 3febe54883bd..540f20bf9e22 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
21 | #include <linux/usbdevice_fs.h> | 21 | #include <linux/usbdevice_fs.h> |
22 | #include <linux/usb/hcd.h> | 22 | #include <linux/usb/hcd.h> |
23 | #include <linux/usb/otg.h> | ||
23 | #include <linux/usb/quirks.h> | 24 | #include <linux/usb/quirks.h> |
24 | #include <linux/kthread.h> | 25 | #include <linux/kthread.h> |
25 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
@@ -4101,6 +4102,13 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, | |||
4101 | } | 4102 | } |
4102 | } | 4103 | } |
4103 | 4104 | ||
4105 | if (hcd->phy && !hdev->parent) { | ||
4106 | if (portstatus & USB_PORT_STAT_CONNECTION) | ||
4107 | usb_phy_notify_connect(hcd->phy, port1); | ||
4108 | else | ||
4109 | usb_phy_notify_disconnect(hcd->phy, port1); | ||
4110 | } | ||
4111 | |||
4104 | /* Return now if debouncing failed or nothing is connected or | 4112 | /* Return now if debouncing failed or nothing is connected or |
4105 | * the device was "removed". | 4113 | * the device was "removed". |
4106 | */ | 4114 | */ |