summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ozwpan/ozusbsvc.h
diff options
context:
space:
mode:
authorChris Kelly2012-02-20 22:12:08 +0100
committerGreg Kroah-Hartman2012-02-24 18:26:51 +0100
commitb3147863b523912633bfd4876d242cd5ae7d8e7a (patch)
treef83f0b6839a68bd79be09cd3e466cfca439a5b19 /drivers/staging/ozwpan/ozusbsvc.h
parentstaging: ozwpan: Added USB HCD implementation (diff)
downloadkernel-qcow2-linux-b3147863b523912633bfd4876d242cd5ae7d8e7a.tar.gz
kernel-qcow2-linux-b3147863b523912633bfd4876d242cd5ae7d8e7a.tar.xz
kernel-qcow2-linux-b3147863b523912633bfd4876d242cd5ae7d8e7a.zip
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/ozusbsvc.h')
-rw-r--r--drivers/staging/ozwpan/ozusbsvc.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozusbsvc.h b/drivers/staging/ozwpan/ozusbsvc.h
new file mode 100644
index 000000000000..58e05a59be31
--- /dev/null
+++ b/drivers/staging/ozwpan/ozusbsvc.h
@@ -0,0 +1,32 @@
+/* -----------------------------------------------------------------------------
+ * Copyright (c) 2011 Ozmo Inc
+ * Released under the GNU General Public License Version 2 (GPLv2).
+ * -----------------------------------------------------------------------------
+ */
+#ifndef _OZUSBSVC_H
+#define _OZUSBSVC_H
+
+/*------------------------------------------------------------------------------
+ * Per PD context info stored in application context area of PD.
+ * This object is reference counted to ensure it doesn't disappear while
+ * still in use.
+ */
+struct oz_usb_ctx {
+ atomic_t ref_count;
+ u8 tx_seq_num;
+ u8 rx_seq_num;
+ struct oz_pd *pd;
+ void *hport;
+ int stopped;
+};
+
+int oz_usb_init(void);
+void oz_usb_term(void);
+int oz_usb_start(struct oz_pd *pd, int resume);
+void oz_usb_stop(struct oz_pd *pd, int pause);
+void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt);
+int oz_usb_heartbeat(struct oz_pd *pd);
+void oz_usb_farewell(struct oz_pd *pd, u8 ep_num, u8 *data, u8 len);
+
+#endif /* _OZUSBSVC_H */
+