Blame view
include/linux/usbdevice_fs.h
6.33 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
/*****************************************************************************/ /* * usbdevice_fs.h -- USB device file system. * * Copyright (C) 2000 * Thomas Sailer (sailer@ife.ee.ethz.ch) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * History: * 0.1 04.01.2000 Created |
1da177e4c Linux-2.6.12-rc2 |
25 26 27 28 29 30 31 32 |
*/ /*****************************************************************************/ #ifndef _LINUX_USBDEVICE_FS_H #define _LINUX_USBDEVICE_FS_H #include <linux/types.h> |
e18fa700c Move several *_SU... |
33 |
#include <linux/magic.h> |
1da177e4c Linux-2.6.12-rc2 |
34 35 |
/* --------------------------------------------------------------------- */ |
1da177e4c Linux-2.6.12-rc2 |
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
/* usbdevfs ioctl codes */ struct usbdevfs_ctrltransfer { __u8 bRequestType; __u8 bRequest; __u16 wValue; __u16 wIndex; __u16 wLength; __u32 timeout; /* in milliseconds */ void __user *data; }; struct usbdevfs_bulktransfer { unsigned int ep; unsigned int len; unsigned int timeout; /* in milliseconds */ void __user *data; }; struct usbdevfs_setinterface { unsigned int interface; unsigned int altsetting; }; struct usbdevfs_disconnectsignal { unsigned int signr; void __user *context; }; #define USBDEVFS_MAXDRIVERNAME 255 struct usbdevfs_getdriver { unsigned int interface; char driver[USBDEVFS_MAXDRIVERNAME + 1]; }; struct usbdevfs_connectinfo { unsigned int devnum; unsigned char slow; }; |
14722ef4a USB: usbfs: expor... |
76 77 |
#define USBDEVFS_URB_SHORT_NOT_OK 0x01 #define USBDEVFS_URB_ISO_ASAP 0x02 |
01c6460f9 USB: usbfs: add U... |
78 |
#define USBDEVFS_URB_BULK_CONTINUATION 0x04 |
14722ef4a USB: usbfs: expor... |
79 80 81 |
#define USBDEVFS_URB_NO_FSBR 0x20 #define USBDEVFS_URB_ZERO_PACKET 0x40 #define USBDEVFS_URB_NO_INTERRUPT 0x80 |
1da177e4c Linux-2.6.12-rc2 |
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
#define USBDEVFS_URB_TYPE_ISO 0 #define USBDEVFS_URB_TYPE_INTERRUPT 1 #define USBDEVFS_URB_TYPE_CONTROL 2 #define USBDEVFS_URB_TYPE_BULK 3 struct usbdevfs_iso_packet_desc { unsigned int length; unsigned int actual_length; unsigned int status; }; struct usbdevfs_urb { unsigned char type; unsigned char endpoint; int status; unsigned int flags; void __user *buffer; int buffer_length; int actual_length; int start_frame; int number_of_packets; int error_count; |
bc59462b8 USB: Fix signr co... |
105 106 |
unsigned int signr; /* signal to be sent on completion, or 0 if none should be sent. */ |
7f9705b04 USB: usbdevfs_urb... |
107 |
void __user *usercontext; |
1da177e4c Linux-2.6.12-rc2 |
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
struct usbdevfs_iso_packet_desc iso_frame_desc[0]; }; /* ioctls for talking directly to drivers */ struct usbdevfs_ioctl { int ifno; /* interface 0..N ; negative numbers reserved */ int ioctl_code; /* MUST encode size + direction of data so the * macros in <asm/ioctl.h> give correct values */ void __user *data; /* param buffer (in, or out) */ }; /* You can do most things with hubs just through control messages, * except find out what device connects to what port. */ struct usbdevfs_hub_portinfo { char nports; /* number of downstream ports in this hub */ char port [127]; /* e.g. port 3 connects to device 27 */ }; |
eae19a762 Don't export CONF... |
125 |
#ifdef __KERNEL__ |
1da177e4c Linux-2.6.12-rc2 |
126 |
#ifdef CONFIG_COMPAT |
ce441594e [PATCH] USB: fix ... |
127 |
#include <linux/compat.h> |
637e8a60a usbdevfs: move co... |
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
struct usbdevfs_ctrltransfer32 { u8 bRequestType; u8 bRequest; u16 wValue; u16 wIndex; u16 wLength; u32 timeout; /* in milliseconds */ compat_caddr_t data; }; struct usbdevfs_bulktransfer32 { compat_uint_t ep; compat_uint_t len; compat_uint_t timeout; /* in milliseconds */ compat_caddr_t data; }; struct usbdevfs_disconnectsignal32 { compat_int_t signr; compat_caddr_t context; }; |
1da177e4c Linux-2.6.12-rc2 |
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
struct usbdevfs_urb32 { unsigned char type; unsigned char endpoint; compat_int_t status; compat_uint_t flags; compat_caddr_t buffer; compat_int_t buffer_length; compat_int_t actual_length; compat_int_t start_frame; compat_int_t number_of_packets; compat_int_t error_count; compat_uint_t signr; compat_caddr_t usercontext; /* unused */ struct usbdevfs_iso_packet_desc iso_frame_desc[0]; }; |
c36fc889b [PATCH] usb: Patc... |
165 166 167 168 169 170 |
struct usbdevfs_ioctl32 { s32 ifno; s32 ioctl_code; compat_caddr_t data; }; |
1da177e4c Linux-2.6.12-rc2 |
171 |
#endif |
eae19a762 Don't export CONF... |
172 |
#endif /* __KERNEL__ */ |
1da177e4c Linux-2.6.12-rc2 |
173 174 |
#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) |
637e8a60a usbdevfs: move co... |
175 |
#define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32) |
1da177e4c Linux-2.6.12-rc2 |
176 |
#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) |
637e8a60a usbdevfs: move co... |
177 |
#define USBDEVFS_BULK32 _IOWR('U', 2, struct usbdevfs_bulktransfer32) |
1da177e4c Linux-2.6.12-rc2 |
178 179 180 181 182 183 184 185 |
#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int) #define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface) #define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int) #define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver) #define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb) #define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) #define USBDEVFS_DISCARDURB _IO('U', 11) #define USBDEVFS_REAPURB _IOW('U', 12, void *) |
fc8d91912 USB: use __u32 ra... |
186 |
#define USBDEVFS_REAPURB32 _IOW('U', 12, __u32) |
1da177e4c Linux-2.6.12-rc2 |
187 |
#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) |
fc8d91912 USB: use __u32 ra... |
188 |
#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32) |
1da177e4c Linux-2.6.12-rc2 |
189 |
#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) |
637e8a60a usbdevfs: move co... |
190 |
#define USBDEVFS_DISCSIGNAL32 _IOR('U', 14, struct usbdevfs_disconnectsignal32) |
1da177e4c Linux-2.6.12-rc2 |
191 192 193 194 |
#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) #define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo) #define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl) |
c36fc889b [PATCH] usb: Patc... |
195 |
#define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32) |
1da177e4c Linux-2.6.12-rc2 |
196 197 198 199 200 |
#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo) #define USBDEVFS_RESET _IO('U', 20) #define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int) #define USBDEVFS_DISCONNECT _IO('U', 22) #define USBDEVFS_CONNECT _IO('U', 23) |
7cbe5dca3 USB: add API for ... |
201 202 |
#define USBDEVFS_CLAIM_PORT _IOR('U', 24, unsigned int) #define USBDEVFS_RELEASE_PORT _IOR('U', 25, unsigned int) |
1da177e4c Linux-2.6.12-rc2 |
203 |
#endif /* _LINUX_USBDEVICE_FS_H */ |