summaryrefslogtreecommitdiff
path: root/drivers/staging/ozwpan/ozusbif.h
diff options
context:
space:
mode:
authorChris Kelly <ckelly@ozmodevices.com>2012-02-20 21:12:08 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 17:26:51 (GMT)
commitb3147863b523912633bfd4876d242cd5ae7d8e7a (patch)
treef83f0b6839a68bd79be09cd3e466cfca439a5b19 /drivers/staging/ozwpan/ozusbif.h
parentae926051d7eb8f80dba9513db70d2e2fc8385d3a (diff)
downloadlinux-fsl-qoriq-b3147863b523912633bfd4876d242cd5ae7d8e7a.tar.xz
staging: ozwpan: Added USB service to protocol
The L2 protocol supports various services, one of which is USB. This provides the implementation of that service and plumbs it to the virtual USB HCD. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/ozusbif.h')
-rw-r--r--drivers/staging/ozwpan/ozusbif.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozusbif.h b/drivers/staging/ozwpan/ozusbif.h
new file mode 100644
index 0000000..3acf598
--- /dev/null
+++ b/drivers/staging/ozwpan/ozusbif.h
@@ -0,0 +1,43 @@
+/* -----------------------------------------------------------------------------
+ * Copyright (c) 2011 Ozmo Inc
+ * Released under the GNU General Public License Version 2 (GPLv2).
+ * -----------------------------------------------------------------------------
+ */
+#ifndef _OZUSBIF_H
+#define _OZUSBIF_H
+
+#include <linux/usb.h>
+
+/* Reference counting functions.
+ */
+void oz_usb_get(void *hpd);
+void oz_usb_put(void *hpd);
+
+/* Stream functions.
+ */
+int oz_usb_stream_create(void *hpd, u8 ep_num);
+int oz_usb_stream_delete(void *hpd, u8 ep_num);
+
+/* Request functions.
+ */
+int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup,
+ u8 *data, int data_len);
+int oz_usb_get_desc_req(void *hpd, u8 req_id, u8 req_type, u8 desc_type,
+ u8 index, u16 windex, int offset, int len);
+int oz_usb_send_isoc(void *hpd, u8 ep_num, struct urb *urb);
+void oz_usb_request_heartbeat(void *hpd);
+
+/* Confirmation functions.
+ */
+void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status,
+ u8 *desc, int length, int offset, int total_size);
+void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode,
+ u8 *data, int data_len);
+
+/* Indication functions.
+ */
+void oz_hcd_data_ind(void *hport, u8 endpoint, u8 *data, int data_len);
+
+int oz_hcd_heartbeat(void *hport);
+
+#endif /* _OZUSBIF_H */