vmod/vmodttl: fixed bug related to luns not ordered and/or not starting from zero.
[ht-drivers.git] / cvorg / include / skeluser_ioctl.h
blob5a830c28245441e09645fb931d2567cf3b19cf5a
1 /**
2 * @file skeluser_ioctl.h
4 * @brief Specific IOCTL's for the CVORG
6 * Copyright (c) 2009 CERN
7 * @author Emilio G. Cota <cota@braap.org>
9 * @section license_sec License
10 * Released under the GPL v2. (and only v2, not any later version)
12 #ifndef _CVORG_IOCTL_H_
13 #define _CVORG_IOCTL_H_
15 #include <cvorg.h>
18 * Note. You can change any macro _name_ in this file *except* the following:
19 * - SKELUSER_IOCTL_MAGIC
20 * - SkelDrvrSPECIFIC_IOCTL_CALLS
21 * - SkelUserIoctlFIRST
22 * - SkelUserIoctlLAST
25 #define SKELUSER_IOCTL_MAGIC 'G'
27 #define CVORG_IO(nr) _IO(SKELUSER_IOCTL_MAGIC, nr)
28 #define CVORG_IOR(nr,sz) _IOR(SKELUSER_IOCTL_MAGIC, nr, sz)
29 #define CVORG_IOW(nr,sz) _IOW(SKELUSER_IOCTL_MAGIC, nr, sz)
30 #define CVORG_IOWR(nr,sz) _IOWR(SKELUSER_IOCTL_MAGIC, nr, sz)
34 * S (Set)-> set through a pointer
35 * T (Tell)-> Tell directly with the argument value
36 * G (Get)-> reply by setting through a pointer
37 * Q (Query)-> response is on the return value
38 * X (eXchange)-> switch G and S atomically
39 * H (sHift)-> switch T and Q atomically
41 * IOCTL numbers:
42 * From 1 to 10, IOCTLs that don't require locking/ownership
43 * From 11 to 50, IOCTLs that require module locking only
44 * From 51 to 90, IOCTLs that require module locking + ownership
46 #define CVORG_IOCTL_NO_LOCKING 10
47 #define CVORG_IOCTL_LOCKING 50
48 #define CVORG_IOCTL_OWNERSHIP 90
50 #define CVORG_IOCGCHANNEL CVORG_IOR (11, uint32_t)
51 #define SkelUserIoctlFIRST CVORG_IOCGCHANNEL
52 #define CVORG_IOCSCHANNEL CVORG_IOW (12, uint32_t)
54 #define CVORG_IOCGOUTOFFSET CVORG_IOR (13, uint32_t)
55 #define CVORG_IOCSOUTOFFSET CVORG_IOW (53, uint32_t)
57 #define CVORG_IOCGINPOLARITY CVORG_IOR (14, uint32_t)
58 #define CVORG_IOCSINPOLARITY CVORG_IOW (54, uint32_t)
60 #define CVORG_IOCGPLL CVORG_IOR (15, struct ad9516_pll)
61 #define CVORG_IOCSPLL CVORG_IOWR(55, struct ad9516_pll)
63 #define CVORG_IOCGSRAM CVORG_IOWR(16, struct cvorg_sram_entry)
64 #define CVORG_IOCSSRAM CVORG_IOWR(56, struct cvorg_sram_entry)
66 #define CVORG_IOCSTRIGGER CVORG_IOW (57, uint32_t)
68 #define CVORG_IOCSLOADSEQ CVORG_IOWR(58, struct cvorg_seq)
70 #define CVORG_IOCGCHANSTAT CVORG_IOR (19, uint32_t)
72 #define CVORG_IOCGSAMPFREQ CVORG_IOR (20, uint32_t)
74 #define CVORG_IOCTUNLOCK_FORCE CVORG_IO (21)
75 #define CVORG_IOCTUNLOCK CVORG_IO (61)
76 #define CVORG_IOCTLOCK CVORG_IO (62)
78 #define CVORG_IOCGMODE CVORG_IOR (23, uint32_t)
79 #define CVORG_IOCSMODE CVORG_IOW (63, uint32_t)
81 #define CVORG_IOCGOUTGAIN CVORG_IOR (24, int32_t)
82 #define CVORG_IOCSOUTGAIN CVORG_IOWR(64, int32_t)
84 #define CVORG_IOCGADC_READ CVORG_IOWR(65, struct cvorg_adc)
86 #define CVORG_IOCGDAC_VAL CVORG_IOR (26, uint32_t)
87 #define CVORG_IOCSDAC_VAL CVORG_IOW (66, uint32_t)
89 #define CVORG_IOCGDAC_GAIN CVORG_IOR (27, uint16_t)
90 #define CVORG_IOCSDAC_GAIN CVORG_IOW (67, uint16_t)
92 #define CVORG_IOCGDAC_OFFSET CVORG_IOR (28, int16_t)
93 #define CVORG_IOCSDAC_OFFSET CVORG_IOW (68, int16_t)
95 #define CVORG_IOCGTEMPERATURE CVORG_IOR (29, int32_t)
97 #define CVORG_IOCSOUT_ENABLE CVORG_IOW (70, int32_t)
98 #define CVORG_IOCGPCB_ID CVORG_IOR (31, uint64_t)
100 #define SkelUserIoctlLAST CVORG_IOCSOUT_ENABLE
102 #define SkelDrvrSPECIFIC_IOCTL_CALLS (_IOC_NR(SkelUserIoctlLAST) - \
103 _IOC_NR(SkelUserIoctlFIRST) + 1)
105 #endif /* _CVORG_IOCTL_H_ */