aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usbdevice_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usbdevice_fs.h')
-rw-r--r--include/linux/usbdevice_fs.h151
1 files changed, 1 insertions, 150 deletions
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h
index 4abe28e41cbc..04a26285416c 100644
--- a/include/linux/usbdevice_fs.h
+++ b/include/linux/usbdevice_fs.h
@@ -25,126 +25,11 @@
25 */ 25 */
26 26
27/*****************************************************************************/ 27/*****************************************************************************/
28
29#ifndef _LINUX_USBDEVICE_FS_H 28#ifndef _LINUX_USBDEVICE_FS_H
30#define _LINUX_USBDEVICE_FS_H 29#define _LINUX_USBDEVICE_FS_H
31 30
32#include <linux/types.h> 31#include <uapi/linux/usbdevice_fs.h>
33#include <linux/magic.h>
34
35/* --------------------------------------------------------------------- */
36
37/* usbdevfs ioctl codes */
38
39struct usbdevfs_ctrltransfer {
40 __u8 bRequestType;
41 __u8 bRequest;
42 __u16 wValue;
43 __u16 wIndex;
44 __u16 wLength;
45 __u32 timeout; /* in milliseconds */
46 void __user *data;
47};
48
49struct usbdevfs_bulktransfer {
50 unsigned int ep;
51 unsigned int len;
52 unsigned int timeout; /* in milliseconds */
53 void __user *data;
54};
55
56struct usbdevfs_setinterface {
57 unsigned int interface;
58 unsigned int altsetting;
59};
60
61struct usbdevfs_disconnectsignal {
62 unsigned int signr;
63 void __user *context;
64};
65
66#define USBDEVFS_MAXDRIVERNAME 255
67
68struct usbdevfs_getdriver {
69 unsigned int interface;
70 char driver[USBDEVFS_MAXDRIVERNAME + 1];
71};
72
73struct usbdevfs_connectinfo {
74 unsigned int devnum;
75 unsigned char slow;
76};
77
78#define USBDEVFS_URB_SHORT_NOT_OK 0x01
79#define USBDEVFS_URB_ISO_ASAP 0x02
80#define USBDEVFS_URB_BULK_CONTINUATION 0x04
81#define USBDEVFS_URB_NO_FSBR 0x20
82#define USBDEVFS_URB_ZERO_PACKET 0x40
83#define USBDEVFS_URB_NO_INTERRUPT 0x80
84
85#define USBDEVFS_URB_TYPE_ISO 0
86#define USBDEVFS_URB_TYPE_INTERRUPT 1
87#define USBDEVFS_URB_TYPE_CONTROL 2
88#define USBDEVFS_URB_TYPE_BULK 3
89 32
90struct usbdevfs_iso_packet_desc {
91 unsigned int length;
92 unsigned int actual_length;
93 unsigned int status;
94};
95
96struct usbdevfs_urb {
97 unsigned char type;
98 unsigned char endpoint;
99 int status;
100 unsigned int flags;
101 void __user *buffer;
102 int buffer_length;
103 int actual_length;
104 int start_frame;
105 int number_of_packets;
106 int error_count;
107 unsigned int signr; /* signal to be sent on completion,
108 or 0 if none should be sent. */
109 void __user *usercontext;
110 struct usbdevfs_iso_packet_desc iso_frame_desc[0];
111};
112
113/* ioctls for talking directly to drivers */
114struct usbdevfs_ioctl {
115 int ifno; /* interface 0..N ; negative numbers reserved */
116 int ioctl_code; /* MUST encode size + direction of data so the
117 * macros in <asm/ioctl.h> give correct values */
118 void __user *data; /* param buffer (in, or out) */
119};
120
121/* You can do most things with hubs just through control messages,
122 * except find out what device connects to what port. */
123struct usbdevfs_hub_portinfo {
124 char nports; /* number of downstream ports in this hub */
125 char port [127]; /* e.g. port 3 connects to device 27 */
126};
127
128/* Device capability flags */
129#define USBDEVFS_CAP_ZERO_PACKET 0x01
130#define USBDEVFS_CAP_BULK_CONTINUATION 0x02
131#define USBDEVFS_CAP_NO_PACKET_SIZE_LIM 0x04
132#define USBDEVFS_CAP_BULK_SCATTER_GATHER 0x08
133
134/* USBDEVFS_DISCONNECT_CLAIM flags & struct */
135
136/* disconnect-and-claim if the driver matches the driver field */
137#define USBDEVFS_DISCONNECT_CLAIM_IF_DRIVER 0x01
138/* disconnect-and-claim except when the driver matches the driver field */
139#define USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER 0x02
140
141struct usbdevfs_disconnect_claim {
142 unsigned int interface;
143 unsigned int flags;
144 char driver[USBDEVFS_MAXDRIVERNAME + 1];
145};
146
147#ifdef __KERNEL__
148#ifdef CONFIG_COMPAT 33#ifdef CONFIG_COMPAT
149#include <linux/compat.h> 34#include <linux/compat.h>
150 35
@@ -192,38 +77,4 @@ struct usbdevfs_ioctl32 {
192 compat_caddr_t data; 77 compat_caddr_t data;
193}; 78};
194#endif 79#endif
195#endif /* __KERNEL__ */
196
197#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
198#define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32)
199#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
200#define USBDEVFS_BULK32 _IOWR('U', 2, struct usbdevfs_bulktransfer32)
201#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
202#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
203#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
204#define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
205#define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
206#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
207#define USBDEVFS_DISCARDURB _IO('U', 11)
208#define USBDEVFS_REAPURB _IOW('U', 12, void *)
209#define USBDEVFS_REAPURB32 _IOW('U', 12, __u32)
210#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
211#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32)
212#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
213#define USBDEVFS_DISCSIGNAL32 _IOR('U', 14, struct usbdevfs_disconnectsignal32)
214#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
215#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
216#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
217#define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
218#define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32)
219#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
220#define USBDEVFS_RESET _IO('U', 20)
221#define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int)
222#define USBDEVFS_DISCONNECT _IO('U', 22)
223#define USBDEVFS_CONNECT _IO('U', 23)
224#define USBDEVFS_CLAIM_PORT _IOR('U', 24, unsigned int)
225#define USBDEVFS_RELEASE_PORT _IOR('U', 25, unsigned int)
226#define USBDEVFS_GET_CAPABILITIES _IOR('U', 26, __u32)
227#define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)
228
229#endif /* _LINUX_USBDEVICE_FS_H */ 80#endif /* _LINUX_USBDEVICE_FS_H */