[PATCH v3 03/12] usb: ehci-hcd: notify phy when connect change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 <richard.zhao@xxxxxxxxxxxxx>
---
 drivers/usb/host/ehci-hcd.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b100f5f..8c39a7a 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -928,6 +928,20 @@ 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 ((pstatus & PORT_CSC) && ehci->transceiver) {
+				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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter