From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] usb: ehci: implement detect callback
Date: Thu, 20 Jun 2013 16:05:25 +0200 [thread overview]
Message-ID: <1371737125-18820-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1371737125-18820-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2013-06-20 14:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 14:05 [PATCH] usb: " Sascha Hauer
2013-06-20 14:05 ` [PATCH 1/4] usb: rename USB devices to reflect bus structure Sascha Hauer
2013-06-20 14:05 ` [PATCH 2/4] usb: move scanned status into core Sascha Hauer
2013-06-20 14:05 ` [PATCH 3/4] usb: implement a usb_host_detect to scan individual USB hosts Sascha Hauer
2013-06-20 14:05 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371737125-18820-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox