[PATCH 4/4] usb: ehci: implement detect callback
Sascha Hauer
s.hauer at pengutronix.de
Thu Jun 20 10:05:25 EDT 2013
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/usb/host/ehci-hcd.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7c389aa..840aa1a 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -847,6 +847,13 @@ submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
return -1;
}
+static int ehci_detect(struct device_d *dev)
+{
+ struct ehci_priv *ehci = dev->priv;
+
+ return usb_host_detect(&ehci->host, 0);
+}
+
int ehci_register(struct device_d *dev, struct ehci_data *data)
{
struct usb_host *host;
@@ -882,6 +889,8 @@ int ehci_register(struct device_d *dev, struct ehci_data *data)
ehci_reset(ehci);
}
+ dev->detect = ehci_detect;
+
usb_register_host(host);
reg = HC_VERSION(ehci_readl(&ehci->hccr->cr_capbase));
--
1.8.3.1
More information about the barebox
mailing list