[linux-usb-devel] [PATCH] Add ADU support for Ontrak ADU devices.

2006-08-08 Thread Steven Haigh
Hi guys,

John Homppi has created a patch which I have fixed up to work with  
kernel 2.6.17.7 and similar and I'd like to put it here for  
consideration into the main kernel.

It adds support for Ontrak ADU relay I/O interfaces. URL:  
http://www.ontrak.net/products.htm - Table 5  6

The patch is available at:
http://www.crc.id.au/files/adutux-0.0.13.patch.bz2 or
http://www.crc.id.au/files/adutux-0.0.13.patch for those that like raw text.

I didn't include it in this email as it's ~34Kb uncompressed.

-- 
Steven Haigh

Email: [EMAIL PROTECTED]
Web: http://www.crc.id.au
Phone: (03) 9017 0597 - 0412 935 897

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] [PATCH] Add ADU support for Ontrak ADU devices. (corrected)

2006-08-08 Thread Steven Haigh
  This patch adds support for Ontrak ADU USB devices.

  Patch is against 2.6.17.7

  Feedback and comments are highly appreciated.

  Signed-off-by: Steven Haigh [EMAIL PROTECTED]
  ---

diff -uprN -X linux-2.6.17.7-vanilla/Documentation/dontdiff  
linux-2.6.17.7-vanilla/drivers/usb/input/hid-core.c linux-2.6.17.7/ 
drivers/usb/input/hid-core.c
--- linux-2.6.17.7-vanilla/drivers/usb/input/hid-core.c 2006-07-25  
13:36:01.0 +1000
+++ linux-2.6.17.7/drivers/usb/input/hid-core.c 2006-08-07  
15:27:11.0 +1000
@@ -1617,7 +1617,11 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100,  
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 20,  
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 30,  
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100,  
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 108,  
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 118,  
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200,  
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 300,  
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 400,  
HID_QUIRK_IGNORE },
diff -uprN -X linux-2.6.17.7-vanilla/Documentation/dontdiff  
linux-2.6.17.7-vanilla/drivers/usb/Makefile linux-2.6.17.7/drivers/ 
usb/Makefile
--- linux-2.6.17.7-vanilla/drivers/usb/Makefile 2006-07-25  
13:36:01.0 +1000
+++ linux-2.6.17.7/drivers/usb/Makefile 2006-08-07 15:27:11.0  
+1000
@@ -61,6 +61,7 @@ obj-$(CONFIG_USB_TEST)+= misc/
  obj-$(CONFIG_USB_USS720)  += misc/
  obj-$(CONFIG_USB_PHIDGETSERVO)+= misc/
  obj-$(CONFIG_USB_SISUSBVGA)   += misc/
+obj-$(CONFIG_USB_ADUTUX)   += misc/

  obj-$(CONFIG_USB_ATM) += atm/
  obj-$(CONFIG_USB_SPEEDTOUCH)  += atm/
diff -uprN -X linux-2.6.17.7-vanilla/Documentation/dontdiff  
linux-2.6.17.7-vanilla/drivers/usb/misc/adutux.c linux-2.6.17.7/ 
drivers/usb/misc/adutux.c
--- linux-2.6.17.7-vanilla/drivers/usb/misc/adutux.c1970-01-01  
10:00:00.0 +1000
+++ linux-2.6.17.7/drivers/usb/misc/adutux.c2006-08-09  
07:32:33.0 +1000
@@ -0,0 +1,1051 @@
+/*
+ * adutux - driver for ADU devices from Ontrak Control Systems
+ * This is an experimental driver. Use at your own risk.
+ * This driver is not supported by Ontrak Control Systems.
+ *
+ * Copyright (c) 2003 John Homppi (SCO, leave this notice here)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * derived from the Lego USB Tower driver 0.56:
+ * Copyright (c) 2003 David Glance davidgsf at sourceforge.net
+ *   2001 Juergen Stuber stuber at loria.fr
+ * that was derived from USB Skeleton driver - 0.5
+ * Copyright (c) 2001 Greg Kroah-Hartman (greg at kroah.com)
+ *
+ * History:
+ *
+ * 2006-08-07 - 0.0.13 - shaigh
+ *   - fixed various errors to compile on kernel 2.6.17.7
+ * 2006-02-19 - 0.0.12 - jhomppi
+ *   - remove the mode parameter from the usb_class_driver structure
+ * (for kernel version 2.6.15)
+ * 2006-02-03 - 0.0.11 jhomppi
+ *   - remove the serial number retrieval short-cut
+ * 2006-01-16 - 0.0.10 jhomppi
+ *   - use vendor/product table in adu_probe
+ *   - check LINUX_VERSION_CODE for version of linux kernel
+ * and utilize appropriate termination of transfer
+ * 2005-12-02 - 0.0.9 jhomppi
+ *   - pre-stage an input read URB to catch first read operation
+ * 2005-11-21 - 0.0.8 jhomppi
+ *   - add ADU120,ADU130,ADU208,ADU218 to supported device list
+ * 2005-11-20 - 0.0.7 jhomppi
+ *   - remove references to URB_ASYNC_UNLINK
+ *   - add MODULE_LICENSE macro to identify our license to kernel
+ * 2005-09-20 - 0.0.6 jhomppi
+ *   - replace deprecated usb_unlink_urb with usb_kill_urb
+ * 2003-12-23 - 0.0.5 jhomppi
+ *   - urb after each read and write
+ * 2003-12-02 - 0.0.4 jhomppi
+ *   - replace urb_submitted with urb status==-EINPROGRESS to stay
+ * in synch with real urb state
+ *   - allow multiple open handles to the same device (now that
+ * urb_submitted problem has been removed)
+ * 2003-11-28 - 0.0.3 jhomppi
+ *   - applied more changes suggested by Oliver Neukum
+ *   - pre-start read if a buffer is available
+ *   - correct the location of spin_unlock at end of a read
+ *   - added hack to return serial number to caller if read buffer
+ * starts with an 's' (allows serial# retrieval without ioctl)
+ *   - check that udev was not nuked by an early disconnect
+ * (ie

[linux-usb-devel] [PATCH] Add ADU support for Ontrak ADU devices.

2006-08-08 Thread Steven Haigh
  This patch adds support for Ontrak ADU USB devices.

  Patch is against 2.6.17.7

  Feedback and comments are highly appreciated. Tried sending via mutt this
  time, so hopefully line wrap won't be an issue.

  Signed-off-by: Steven Haigh [EMAIL PROTECTED]
  ---

diff -uprN -X linux-2.6.17.7-vanilla/Documentation/dontdiff 
linux-2.6.17.7-vanilla/drivers/usb/input/hid-core.c 
linux-2.6.17.7/drivers/usb/input/hid-core.c
--- linux-2.6.17.7-vanilla/drivers/usb/input/hid-core.c 2006-07-25 
13:36:01.0 +1000
+++ linux-2.6.17.7/drivers/usb/input/hid-core.c 2006-08-07 15:27:11.0 
+1000
@@ -1617,7 +1617,11 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 20, 
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 30, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100, 
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 108, 
HID_QUIRK_IGNORE },
+   { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 118, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 300, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 400, 
HID_QUIRK_IGNORE },
diff -uprN -X linux-2.6.17.7-vanilla/Documentation/dontdiff 
linux-2.6.17.7-vanilla/drivers/usb/Makefile linux-2.6.17.7/drivers/usb/Makefile
--- linux-2.6.17.7-vanilla/drivers/usb/Makefile 2006-07-25 13:36:01.0 
+1000
+++ linux-2.6.17.7/drivers/usb/Makefile 2006-08-07 15:27:11.0 +1000
@@ -61,6 +61,7 @@ obj-$(CONFIG_USB_TEST)+= misc/
 obj-$(CONFIG_USB_USS720)   += misc/
 obj-$(CONFIG_USB_PHIDGETSERVO) += misc/
 obj-$(CONFIG_USB_SISUSBVGA)+= misc/
+obj-$(CONFIG_USB_ADUTUX)   += misc/
 
 obj-$(CONFIG_USB_ATM)  += atm/
 obj-$(CONFIG_USB_SPEEDTOUCH)   += atm/
diff -uprN -X linux-2.6.17.7-vanilla/Documentation/dontdiff 
linux-2.6.17.7-vanilla/drivers/usb/misc/adutux.c 
linux-2.6.17.7/drivers/usb/misc/adutux.c
--- linux-2.6.17.7-vanilla/drivers/usb/misc/adutux.c1970-01-01 
10:00:00.0 +1000
+++ linux-2.6.17.7/drivers/usb/misc/adutux.c2006-08-09 07:32:33.0 
+1000
@@ -0,0 +1,1051 @@
+/*
+ * adutux - driver for ADU devices from Ontrak Control Systems
+ * This is an experimental driver. Use at your own risk.
+ * This driver is not supported by Ontrak Control Systems.
+ *
+ * Copyright (c) 2003 John Homppi (SCO, leave this notice here)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * derived from the Lego USB Tower driver 0.56:
+ * Copyright (c) 2003 David Glance davidgsf at sourceforge.net 
+ *   2001 Juergen Stuber stuber at loria.fr
+ * that was derived from USB Skeleton driver - 0.5
+ * Copyright (c) 2001 Greg Kroah-Hartman (greg at kroah.com)
+ *
+ * History:
+ *
+ * 2006-08-07 - 0.0.13 - shaigh
+ *   - fixed various errors to compile on kernel 2.6.17.7
+ * 2006-02-19 - 0.0.12 - jhomppi
+ *   - remove the mode parameter from the usb_class_driver structure
+ * (for kernel version 2.6.15)
+ * 2006-02-03 - 0.0.11 jhomppi
+ *   - remove the serial number retrieval short-cut
+ * 2006-01-16 - 0.0.10 jhomppi
+ *   - use vendor/product table in adu_probe
+ *   - check LINUX_VERSION_CODE for version of linux kernel
+ * and utilize appropriate termination of transfer
+ * 2005-12-02 - 0.0.9 jhomppi
+ *   - pre-stage an input read URB to catch first read operation
+ * 2005-11-21 - 0.0.8 jhomppi
+ *   - add ADU120,ADU130,ADU208,ADU218 to supported device list
+ * 2005-11-20 - 0.0.7 jhomppi
+ *   - remove references to URB_ASYNC_UNLINK
+ *   - add MODULE_LICENSE macro to identify our license to kernel
+ * 2005-09-20 - 0.0.6 jhomppi
+ *   - replace deprecated usb_unlink_urb with usb_kill_urb
+ * 2003-12-23 - 0.0.5 jhomppi
+ *   - urb after each read and write
+ * 2003-12-02 - 0.0.4 jhomppi
+ *   - replace urb_submitted with urb status==-EINPROGRESS to stay
+ * in synch with real urb state
+ *   - allow multiple open handles to the same device (now that
+ * urb_submitted problem has been removed)
+ * 2003-11-28 - 0.0.3 jhomppi
+ *   - applied more changes suggested by Oliver Neukum
+ *   - pre-start read if a buffer is available
+ *   - correct the location of spin_unlock at end of a read
+ *   - added hack to return serial number to caller if read buffer
+ * starts with an 's' (allows serial# retrieval without ioctl)
+ *   - check that udev