diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-26 19:22:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:40:51 -0400 |
commit | 5b775f672cc993ba9dba5626811ab1f2ac42883b (patch) | |
tree | 61d8e0706a11e7bb808081720644b11ef58f77cd /include/linux/usb | |
parent | eb86be5424d4c08e686d5e578b72a26c516ae58a (diff) |
USB: add USB test and measurement class driver
This driver was originaly written by Stefan Kopp, but massively
reworked by Greg for submission.
Thanks to Felipe Balbi <me@felipebalbi.com> for lots of work in cleaning
up this driver.
Thanks to Oliver Neukum <oliver@neukum.org> for reviewing previous
versions and pointing out problems.
Cc: Stefan Kopp <stefan_kopp@agilent.com>
Cc: Marcel Janssen <korgull@home.nl>
Cc: Felipe Balbi <me@felipebalbi.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/usb/tmc.h | 43 |
2 files changed, 44 insertions, 1 deletions
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 42e84fc315e3..29fd73b0bffc 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -4,4 +4,4 @@ header-y += ch9.h | |||
4 | header-y += gadgetfs.h | 4 | header-y += gadgetfs.h |
5 | header-y += midi.h | 5 | header-y += midi.h |
6 | header-y += g_printer.h | 6 | header-y += g_printer.h |
7 | 7 | header-y += tmc.h | |
diff --git a/include/linux/usb/tmc.h b/include/linux/usb/tmc.h new file mode 100644 index 000000000000..c045ae12556c --- /dev/null +++ b/include/linux/usb/tmc.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany | ||
3 | * Copyright (C) 2008 Novell, Inc. | ||
4 | * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de> | ||
5 | * | ||
6 | * This file holds USB constants defined by the USB Device Class | ||
7 | * Definition for Test and Measurement devices published by the USB-IF. | ||
8 | * | ||
9 | * It also has the ioctl definitions for the usbtmc kernel driver that | ||
10 | * userspace needs to know about. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_USB_TMC_H | ||
14 | #define __LINUX_USB_TMC_H | ||
15 | |||
16 | /* USB TMC status values */ | ||
17 | #define USBTMC_STATUS_SUCCESS 0x01 | ||
18 | #define USBTMC_STATUS_PENDING 0x02 | ||
19 | #define USBTMC_STATUS_FAILED 0x80 | ||
20 | #define USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS 0x81 | ||
21 | #define USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS 0x82 | ||
22 | #define USBTMC_STATUS_SPLIT_IN_PROGRESS 0x83 | ||
23 | |||
24 | /* USB TMC requests values */ | ||
25 | #define USBTMC_REQUEST_INITIATE_ABORT_BULK_OUT 1 | ||
26 | #define USBTMC_REQUEST_CHECK_ABORT_BULK_OUT_STATUS 2 | ||
27 | #define USBTMC_REQUEST_INITIATE_ABORT_BULK_IN 3 | ||
28 | #define USBTMC_REQUEST_CHECK_ABORT_BULK_IN_STATUS 4 | ||
29 | #define USBTMC_REQUEST_INITIATE_CLEAR 5 | ||
30 | #define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6 | ||
31 | #define USBTMC_REQUEST_GET_CAPABILITIES 7 | ||
32 | #define USBTMC_REQUEST_INDICATOR_PULSE 64 | ||
33 | |||
34 | /* Request values for USBTMC driver's ioctl entry point */ | ||
35 | #define USBTMC_IOC_NR 91 | ||
36 | #define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1) | ||
37 | #define USBTMC_IOCTL_CLEAR _IO(USBTMC_IOC_NR, 2) | ||
38 | #define USBTMC_IOCTL_ABORT_BULK_OUT _IO(USBTMC_IOC_NR, 3) | ||
39 | #define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4) | ||
40 | #define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6) | ||
41 | #define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7) | ||
42 | |||
43 | #endif | ||