Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _LINUX_USBDEVICE_FS_H
     13 #define _LINUX_USBDEVICE_FS_H
     14 
     15 #include <linux/types.h>
     16 
     17 #define USBDEVICE_SUPER_MAGIC 0x9fa2
     18 
     19 struct usbdevfs_ctrltransfer {
     20  __u8 bRequestType;
     21  __u8 bRequest;
     22  __u16 wValue;
     23  __u16 wIndex;
     24  __u16 wLength;
     25  __u32 timeout;
     26  void __user *data;
     27 };
     28 
     29 struct usbdevfs_bulktransfer {
     30  unsigned int ep;
     31  unsigned int len;
     32  unsigned int timeout;
     33  void __user *data;
     34 };
     35 
     36 struct usbdevfs_setinterface {
     37  unsigned int interface;
     38  unsigned int altsetting;
     39 };
     40 
     41 struct usbdevfs_disconnectsignal {
     42  unsigned int signr;
     43  void __user *context;
     44 };
     45 
     46 #define USBDEVFS_MAXDRIVERNAME 255
     47 
     48 struct usbdevfs_getdriver {
     49  unsigned int interface;
     50  char driver[USBDEVFS_MAXDRIVERNAME + 1];
     51 };
     52 
     53 struct usbdevfs_connectinfo {
     54  unsigned int devnum;
     55  unsigned char slow;
     56 };
     57 
     58 #define USBDEVFS_URB_SHORT_NOT_OK 1
     59 #define USBDEVFS_URB_ISO_ASAP 2
     60 
     61 #define USBDEVFS_URB_TYPE_ISO 0
     62 #define USBDEVFS_URB_TYPE_INTERRUPT 1
     63 #define USBDEVFS_URB_TYPE_CONTROL 2
     64 #define USBDEVFS_URB_TYPE_BULK 3
     65 
     66 struct usbdevfs_iso_packet_desc {
     67  unsigned int length;
     68  unsigned int actual_length;
     69  unsigned int status;
     70 };
     71 
     72 struct usbdevfs_urb {
     73  unsigned char type;
     74  unsigned char endpoint;
     75  int status;
     76  unsigned int flags;
     77  void __user *buffer;
     78  int buffer_length;
     79  int actual_length;
     80  int start_frame;
     81  int number_of_packets;
     82  int error_count;
     83  unsigned int signr;
     84  void *usercontext;
     85  struct usbdevfs_iso_packet_desc iso_frame_desc[0];
     86 };
     87 
     88 struct usbdevfs_ioctl {
     89  int ifno;
     90  int ioctl_code;
     91  void __user *data;
     92 };
     93 
     94 struct usbdevfs_hub_portinfo {
     95  char nports;
     96  char port [127];
     97 };
     98 
     99 #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
    100 #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
    101 #define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
    102 #define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
    103 #define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
    104 #define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
    105 #define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
    106 #define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
    107 #define USBDEVFS_DISCARDURB _IO('U', 11)
    108 #define USBDEVFS_REAPURB _IOW('U', 12, void *)
    109 #define USBDEVFS_REAPURB32 _IOW('U', 12, u32)
    110 #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
    111 #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32)
    112 #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
    113 #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
    114 #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
    115 #define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
    116 #define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
    117 #define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32)
    118 #define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
    119 #define USBDEVFS_RESET _IO('U', 20)
    120 #define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int)
    121 #define USBDEVFS_DISCONNECT _IO('U', 22)
    122 #define USBDEVFS_CONNECT _IO('U', 23)
    123 #endif
    124