Thread (51 messages) flat view 51 messages, 11 authors, 2011-09-05

Re: [PATCH 08/14] dwc/otg: Add PCD function

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2011-08-31 07:44:24

* Pratyush Anand | 2011-08-30 17:27:55 [+0530]:
quoted hunk ↗ jump to hunk
diff --git a/drivers/usb/dwc/pcd.c b/drivers/usb/dwc/pcd.c
new file mode 100644
index 0000000..2ef6405
--- /dev/null
+++ b/drivers/usb/dwc/pcd.c
+static const struct usb_gadget_ops dwc_otg_pcd_ops = {
+	.get_frame = dwc_otg_pcd_get_frame,
+	.wakeup = dwc_otg_pcd_wakeup,
You may want to provide udc_start and udc_stop hooks.
drivers/usb/dwc3/gadget.c and drivers/usb/musb/musb_gadget.c are two
driver which are using it. The other gadget are using .start and .stop
hooks which I would like to go.
+	/* not selfpowered */
+};
+
+/**
+ * This function registers a gadget driver with the PCD.
+ *
+ * When a driver is successfully registered, it will receive control
+ * requests including set_configuration(), which enables non-control
+ * requests.  then usb traffic follows until a disconnect is reported.
+ * then a host may connect again, or the driver might get unbound.
+ */
+int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
+			    int (*bind) (struct usb_gadget *))
You can not provide usb_gadget_probe_driver() anymore. That is why you
need to provide those hooks I mentioned.

Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help