Home | History | Annotate | Download | only in tusb
      1 /*
      2  *
      3  *   Copyright (c) International Business Machines  Corp., 2001
      4  *
      5  *   This program is free software;  you can redistribute it and/or modify
      6  *   it under the terms of the GNU General Public License as published by
      7  *   the Free Software Foundation; either version 2 of the License, or
      8  *   (at your option) any later version.
      9  *
     10  *   This program is distributed in the hope that it will be useful,
     11  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
     12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
     13  *   the GNU General Public License for more details.
     14  *
     15  *   You should have received a copy of the GNU General Public License
     16  *   along with this program;  if not, write to the Free Software
     17  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     18  *
     19 */
     20 
     21 #define TEST_USB_DRIVER_NAME	"Usb test module"
     22 #define DEVICE_NAME		"/dev/tusb"
     23 #define TUSB_MAJOR      252
     24 
     25 
     26 #define MAG_NUM 		's'
     27 #define FIND_DEV		_IO(MAG_NUM, 1)
     28 #define TEST_FIND_HCD		_IO(MAG_NUM, 2)
     29 #define TEST_HCD_PROBE		_IO(MAG_NUM, 3)
     30 #define TEST_HCD_REMOVE		_IO(MAG_NUM, 4)
     31 #define TEST_HCD_SUSPEND	_IO(MAG_NUM, 5)
     32 #define TEST_HCD_RESUME		_IO(MAG_NUM, 6)
     33 #ifndef SET_MODULE_OWNER
     34 #define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE)
     35 #endif
     36 
     37 /*
     38  * structures for USB test driver
     39  */
     40 struct tusb_interface {
     41         int     in_len;         // input data length
     42         caddr_t in_data;        // input data
     43         int     out_rc;         // return code from the test
     44         int     out_len;        // output data length
     45         caddr_t out_data;       // output data
     46 };
     47 typedef struct tusb_interface tusb_interface_t;
     48