aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/Kconfig2
-rw-r--r--drivers/usb/misc/ldusb.c57
2 files changed, 33 insertions, 26 deletions
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index 6649531fa824..8ba6a701e9c1 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -141,7 +141,7 @@ source "drivers/usb/misc/sisusbvga/Kconfig"
141 141
142config USB_LD 142config USB_LD
143 tristate "USB LD driver" 143 tristate "USB LD driver"
144 depends on USB && EXPERIMENTAL 144 depends on USB
145 help 145 help
146 This driver is for generic USB devices that use interrupt transfers, 146 This driver is for generic USB devices that use interrupt transfers,
147 like LD Didactic's USB devices. 147 like LD Didactic's USB devices.
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index 331d4ae949ed..e2d1198623eb 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -24,6 +24,7 @@
24 * V0.1 (mh) Initial version 24 * V0.1 (mh) Initial version
25 * V0.11 (mh) Added raw support for HID 1.0 devices (no interrupt out endpoint) 25 * V0.11 (mh) Added raw support for HID 1.0 devices (no interrupt out endpoint)
26 * V0.12 (mh) Added kmalloc check for string buffer 26 * V0.12 (mh) Added kmalloc check for string buffer
27 * V0.13 (mh) Added support for LD X-Ray and Machine Test System
27 */ 28 */
28 29
29#include <linux/config.h> 30#include <linux/config.h>
@@ -40,17 +41,20 @@
40 41
41/* Define these values to match your devices */ 42/* Define these values to match your devices */
42#define USB_VENDOR_ID_LD 0x0f11 /* USB Vendor ID of LD Didactic GmbH */ 43#define USB_VENDOR_ID_LD 0x0f11 /* USB Vendor ID of LD Didactic GmbH */
43#define USB_DEVICE_ID_CASSY 0x1000 /* USB Product ID for all CASSY-S modules */ 44#define USB_DEVICE_ID_LD_CASSY 0x1000 /* USB Product ID of CASSY-S */
44#define USB_DEVICE_ID_POCKETCASSY 0x1010 /* USB Product ID for Pocket-CASSY */ 45#define USB_DEVICE_ID_LD_POCKETCASSY 0x1010 /* USB Product ID of Pocket-CASSY */
45#define USB_DEVICE_ID_MOBILECASSY 0x1020 /* USB Product ID for Mobile-CASSY */ 46#define USB_DEVICE_ID_LD_MOBILECASSY 0x1020 /* USB Product ID of Mobile-CASSY */
46#define USB_DEVICE_ID_JWM 0x1080 /* USB Product ID for Joule and Wattmeter */ 47#define USB_DEVICE_ID_LD_JWM 0x1080 /* USB Product ID of Joule and Wattmeter */
47#define USB_DEVICE_ID_DMMP 0x1081 /* USB Product ID for Digital Multimeter P (reserved) */ 48#define USB_DEVICE_ID_LD_DMMP 0x1081 /* USB Product ID of Digital Multimeter P (reserved) */
48#define USB_DEVICE_ID_UMIP 0x1090 /* USB Product ID for UMI P */ 49#define USB_DEVICE_ID_LD_UMIP 0x1090 /* USB Product ID of UMI P */
49#define USB_DEVICE_ID_VIDEOCOM 0x1200 /* USB Product ID for VideoCom */ 50#define USB_DEVICE_ID_LD_XRAY1 0x1100 /* USB Product ID of X-Ray Apparatus */
50#define USB_DEVICE_ID_COM3LAB 0x2000 /* USB Product ID for COM3LAB */ 51#define USB_DEVICE_ID_LD_XRAY2 0x1101 /* USB Product ID of X-Ray Apparatus */
51#define USB_DEVICE_ID_TELEPORT 0x2010 /* USB Product ID for Terminal Adapter */ 52#define USB_DEVICE_ID_LD_VIDEOCOM 0x1200 /* USB Product ID of VideoCom */
52#define USB_DEVICE_ID_NETWORKANALYSER 0x2020 /* USB Product ID for Network Analyser */ 53#define USB_DEVICE_ID_LD_COM3LAB 0x2000 /* USB Product ID of COM3LAB */
53#define USB_DEVICE_ID_POWERCONTROL 0x2030 /* USB Product ID for Controlling device for Power Electronics */ 54#define USB_DEVICE_ID_LD_TELEPORT 0x2010 /* USB Product ID of Terminal Adapter */
55#define USB_DEVICE_ID_LD_NETWORKANALYSER 0x2020 /* USB Product ID of Network Analyser */
56#define USB_DEVICE_ID_LD_POWERCONTROL 0x2030 /* USB Product ID of Converter Control Unit */
57#define USB_DEVICE_ID_LD_MACHINETEST 0x2040 /* USB Product ID of Machine Test System */
54 58
55#define USB_VENDOR_ID_VERNIER 0x08f7 59#define USB_VENDOR_ID_VERNIER 0x08f7
56#define USB_DEVICE_ID_VERNIER_LABPRO 0x0001 60#define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
@@ -67,17 +71,20 @@
67 71
68/* table of devices that work with this driver */ 72/* table of devices that work with this driver */
69static struct usb_device_id ld_usb_table [] = { 73static struct usb_device_id ld_usb_table [] = {
70 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_CASSY) }, 74 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) },
71 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_POCKETCASSY) }, 75 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) },
72 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_MOBILECASSY) }, 76 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) },
73 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_JWM) }, 77 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) },
74 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_DMMP) }, 78 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) },
75 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_UMIP) }, 79 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
76 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_VIDEOCOM) }, 80 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY1) },
77 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_COM3LAB) }, 81 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_XRAY2) },
78 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_TELEPORT) }, 82 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_VIDEOCOM) },
79 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_NETWORKANALYSER) }, 83 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_COM3LAB) },
80 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_POWERCONTROL) }, 84 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_TELEPORT) },
85 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_NETWORKANALYSER) },
86 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERCONTROL) },
87 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETEST) },
81 { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO) }, 88 { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO) },
82 { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP) }, 89 { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP) },
83 { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) }, 90 { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) },
@@ -85,7 +92,7 @@ static struct usb_device_id ld_usb_table [] = {
85 { } /* Terminating entry */ 92 { } /* Terminating entry */
86}; 93};
87MODULE_DEVICE_TABLE(usb, ld_usb_table); 94MODULE_DEVICE_TABLE(usb, ld_usb_table);
88MODULE_VERSION("V0.12"); 95MODULE_VERSION("V0.13");
89MODULE_AUTHOR("Michael Hund <mhund@ld-didactic.de>"); 96MODULE_AUTHOR("Michael Hund <mhund@ld-didactic.de>");
90MODULE_DESCRIPTION("LD USB Driver"); 97MODULE_DESCRIPTION("LD USB Driver");
91MODULE_LICENSE("GPL"); 98MODULE_LICENSE("GPL");
@@ -632,8 +639,8 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
632 639
633 /* workaround for early firmware versions on fast computers */ 640 /* workaround for early firmware versions on fast computers */
634 if ((le16_to_cpu(udev->descriptor.idVendor) == USB_VENDOR_ID_LD) && 641 if ((le16_to_cpu(udev->descriptor.idVendor) == USB_VENDOR_ID_LD) &&
635 ((le16_to_cpu(udev->descriptor.idProduct) == USB_DEVICE_ID_CASSY) || 642 ((le16_to_cpu(udev->descriptor.idProduct) == USB_DEVICE_ID_LD_CASSY) ||
636 (le16_to_cpu(udev->descriptor.idProduct) == USB_DEVICE_ID_COM3LAB)) && 643 (le16_to_cpu(udev->descriptor.idProduct) == USB_DEVICE_ID_LD_COM3LAB)) &&
637 (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x103)) { 644 (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x103)) {
638 buffer = kmalloc(256, GFP_KERNEL); 645 buffer = kmalloc(256, GFP_KERNEL);
639 if (buffer == NULL) { 646 if (buffer == NULL) {