diff options
author | Michael Hund <mhund@ld-didactic.de> | 2006-02-02 03:36:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-02-14 00:33:39 -0500 |
commit | ba3e66e94b9fb8c2a370a90729e068314845549d (patch) | |
tree | f021a85387443d00be8d6b108579a38cec63e37c /drivers/usb/misc | |
parent | a38408cd8d6bc0e5d16e609d4b1fdf9ba2e099ce (diff) |
[PATCH] USB: add new device ids to ldusb
Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/ldusb.c | 57 |
1 files changed, 32 insertions, 25 deletions
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 */ |
69 | static struct usb_device_id ld_usb_table [] = { | 73 | static 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 | }; |
87 | MODULE_DEVICE_TABLE(usb, ld_usb_table); | 94 | MODULE_DEVICE_TABLE(usb, ld_usb_table); |
88 | MODULE_VERSION("V0.12"); | 95 | MODULE_VERSION("V0.13"); |
89 | MODULE_AUTHOR("Michael Hund <mhund@ld-didactic.de>"); | 96 | MODULE_AUTHOR("Michael Hund <mhund@ld-didactic.de>"); |
90 | MODULE_DESCRIPTION("LD USB Driver"); | 97 | MODULE_DESCRIPTION("LD USB Driver"); |
91 | MODULE_LICENSE("GPL"); | 98 | MODULE_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) { |