Skip to content

Commit

Permalink
USB: notify phy when root hub port connect change
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Zhao authored and Greg Kroah-Hartman committed Jul 17, 2012
1 parent 0d5ff30 commit 925aa46
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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".
*/
Expand Down

0 comments on commit 925aa46

Please sign in to comment.