Thread (1 message) 1 message, 1 author, 2012-06-06
DORMANTno replies

[PATCH v4] usb: ehci-hcd: notify phy when connect change

From: Richard Zhao <hidden>
Date: 2012-06-06 01:29:50
Also in: linux-devicetree
Subsystem: the rest, usb ehci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

Possibly related (same subject, not in this thread)

It still has below limitations:
- it does not work for multi-phy ehci
- the best place is after debounce, but I can't get
  phy there

Signed-off-by: Richard Zhao <redacted>
---
 drivers/usb/host/ehci-hcd.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b100f5f..724ac471 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -928,6 +928,21 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 			pstatus = ehci_readl(ehci,
 					 &ehci->regs->port_status[i]);
 
+			/* FIXME:
+			 * - it does not work for multi-phy ehci
+			 * - the best place is after debounce, but I can't get
+			 *   phy there
+			 */
+			if (unlikely(ehci->transceiver &&
+					(pstatus & PORT_CSC))) {
+				if (pstatus & PORT_CONNECT)
+					usb_phy_notify_connect(
+						ehci->transceiver, i);
+				else
+					usb_phy_notify_disconnect(
+						ehci->transceiver, i);
+			}
+
 			if (pstatus & PORT_OWNER)
 				continue;
 			if (!(test_bit(i, &ehci->suspended_ports) &&
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help