Commit 925aa46b authored by Richard Zhao's avatar Richard Zhao Committed by Greg Kroah-Hartman

USB: notify phy when root hub port connect change

Phy may need to change settings when port connect change.
Signed-off-by: default avatarRichard Zhao <richard.zhao@freescale.com>
Tested-by: default avatarSubodh Nijsure <snijsure@grid-net.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d5ff306
......@@ -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".
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment