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

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

From: Pratyush Anand <pratyush.anand@gmail.com>
Date: 2011-09-02 11:26:11

On Wed, Aug 31, 2011 at 1:14 PM, Sebastian Andrzej Siewior
[off-list ref] wrote:
* Pratyush Anand | 2011-08-30 17:27:55 [+0530]:
quoted
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 =3D {
+ =A0 =A0 =A0.get_frame =3D dwc_otg_pcd_get_frame,
+ =A0 =A0 =A0.wakeup =3D 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.
quoted
+ =A0 =A0 =A0/* 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. =A0then 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,
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int (*bind) (struct =
usb_gadget *))
You can not provide usb_gadget_probe_driver() anymore. That is why you
need to provide those hooks I mentioned.
will correct.

Regards
Pratyush
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help