From: Richard Zhao Date: Wed, 11 Jul 2012 03:09:28 +0000 (+0800) Subject: USB: notify phy when root hub port connect change X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=925aa46ba963a4da6d8ee6ab1d04a02ffa8db62b;p=linux-beck.git USB: notify phy when root hub port connect change Phy may need to change settings when port connect change. Signed-off-by: Richard Zhao Tested-by: Subodh Nijsure Signed-off-by: Greg Kroah-Hartman --- 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 @@ #include #include #include +#include #include #include #include @@ -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". */