Linux-libre 2.6.32.54-gnu1
[librecmc/linux-libre.git] / drivers / staging / poch / poch.h
1 /*
2  * User-space DMA and UIO based Redrapids Pocket Change CardBus driver
3  *
4  * Copyright 2008 Vijay Kumar <vijaykumar@bravegnu.org>
5  *
6  * Part of userspace API. Should be moved to a header file in
7  * include/linux for final version.
8  *
9  */
10 struct poch_cbuf_header {
11         __s32 group_size_bytes;
12         __s32 group_count;
13         __s32 group_offsets[0];
14 };
15
16 struct poch_counters {
17         __u32 fifo_empty;
18         __u32 fifo_overflow;
19         __u32 pll_unlock;
20 };
21
22 #define POCH_IOC_NUM                    '9'
23
24 #define POCH_IOC_TRANSFER_START         _IO(POCH_IOC_NUM, 0)
25 #define POCH_IOC_TRANSFER_STOP          _IO(POCH_IOC_NUM, 1)
26 #define POCH_IOC_GET_COUNTERS           _IOR(POCH_IOC_NUM, 2, \
27                                              struct poch_counters)
28 #define POCH_IOC_SYNC_GROUP_FOR_USER    _IO(POCH_IOC_NUM, 3)
29 #define POCH_IOC_SYNC_GROUP_FOR_DEVICE  _IO(POCH_IOC_NUM, 4)