summaryrefslogtreecommitdiff
path: root/drivers/staging/poch/poch.h
diff options
context:
space:
mode:
authorVijay Kumar <vijaykumar@bravegnu.org>2008-10-19 08:58:46 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-22 09:56:36 -0700
commita14edddac99eff625cfcb44829ce206ec04be71a (patch)
tree5872a03d93c3343275cc322d9a475b2a742ace64 /drivers/staging/poch/poch.h
parent0c74433e319dfd67eadc645bb90192d618024a87 (diff)
Staging: add poch driver
This is the first cut at a driver for the Redrapids Pocket Change CardBus devices. Receiving data seems to work properly, but overflows happen on transmit. Still needs more hardware debugging to work properly. (cleaned up to use proper driver core api functions by Greg) From: Vijay Kumar <vijaykumar@bravegnu.org> Cc: Alexey Zaytsev <alexey.zaytsev@gmail.com> Cc: Jaya Kumar <jayakumar.lkml@gmail.com> Cc: Ken Sienski <sienski@redrapids.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/poch/poch.h')
-rw-r--r--drivers/staging/poch/poch.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/staging/poch/poch.h b/drivers/staging/poch/poch.h
new file mode 100644
index 000000000000..51a2d145798e
--- /dev/null
+++ b/drivers/staging/poch/poch.h
@@ -0,0 +1,29 @@
+/*
+ * User-space DMA and UIO based Redrapids Pocket Change CardBus driver
+ *
+ * Copyright 2008 Vijay Kumar <vijaykumar@bravegnu.org>
+ *
+ * Part of userspace API. Should be moved to a header file in
+ * include/linux for final version.
+ *
+ */
+struct poch_cbuf_header {
+ __s32 group_size_bytes;
+ __s32 group_count;
+ __s32 group_offsets[0];
+};
+
+struct poch_counters {
+ __u32 fifo_empty;
+ __u32 fifo_overflow;
+ __u32 pll_unlock;
+};
+
+#define POCH_IOC_NUM '9'
+
+#define POCH_IOC_TRANSFER_START _IO(POCH_IOC_NUM, 0)
+#define POCH_IOC_TRANSFER_STOP _IO(POCH_IOC_NUM, 1)
+#define POCH_IOC_GET_COUNTERS _IOR(POCH_IOC_NUM, 2, \
+ struct poch_counters)
+#define POCH_IOC_SYNC_GROUP_FOR_USER _IO(POCH_IOC_NUM, 3)
+#define POCH_IOC_SYNC_GROUP_FOR_DEVICE _IO(POCH_IOC_NUM, 4)