From 925aa46ba963a4da6d8ee6ab1d04a02ffa8db62b Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Wed, 11 Jul 2012 11:09:28 +0800 Subject: 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 --- drivers/usb/core/hub.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/usb') 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". */ -- cgit v1.2.3