Skip to contentSkip to conversation

Papouch USB thermometer support

PATCH Folkert van Heusden 3 participants 3 messages Mar 24, 2006 – Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

The following patch against 2.6.15 adds support for the www.Papouch.com USB thermometer by adding the appropriate vendor and product id.

Signed off: Folkert van Heusden <[email protected]

ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 renamed from ftdi_sio.c 2006-03-24 20:36:19.000000000 +0100 +1 -0
diff -uNrbBd old/ftdi_sio.c new/ftdi_sio.c
@@ -307,6 +307,7 @@
 
 
 static struct usb_device_id id_table_combined [] = {
+       { USB_DEVICE(PAPOUCHE_VENDOR, PAPOUCHE_THEM_PROD) },
        { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 renamed from ftdi_sio.h 2006-03-24 20:36:19.000000000 +0100 +5 -0
diff -uNrbBd old/ftdi_sio.h new/ftdi_sio.h
@@ -20,8 +20,13 @@
  * Philipp Gühring - [email protected] - added the Device ID of the USB relais
  * from Rudolf Gugler
  *
+ * Folkert van Heusden - [email protected] - added the device id of the
+ * temperature sensor from www.papouch.com
  */
 
+#define PAPOUCHE_VENDOR 0x5050
+#define PAPOUCHE_THEM_PROD 0x0400
+
 #define FTDI_VID       0x0403  /* Vendor Id */
 #define FTDI_SIO_PID   0x8372  /* Product Id SIO application of 8U100AX  */
 #define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */

Folkert van Heusden

Signature · 4 lines
www.vanheusden.com/multitail - multitail is tail on steroids. multiple
               windows, filtering, coloring, anything you can think of
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
#1 lore raw
Quoted 2 lines · Folkert van Heusden

The following patch against 2.6.15 adds support for the www.Papouch.com USB thermometer by adding the appropriate vendor and product id.

OK, this should probably work, but adding a new device support might require a bit more effort...

And since I started looking into the code, I think it may see some cleanup, so I'll be submitting shortly a series of two patches, yours included as a second one. I'll CC you and please add the correct Signed-off-by line if you agree and repost.

The page for this device is here:
http://www.papouch.com/shop/scripts/_detail.asp?katcislo=0188

Specs (in Polish) here:
http://www.papouch.com/shop/scripts/pdf/tmu.pdf

Quoted 2 lines

Be careful with this line:

Quoted 1 line

Signed off: Folkert van Heusden <[email protected]

Should be:

ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 line 310

Quoted 8 lines

diff -uNrbBd old/ftdi_sio.c new/ftdi_sio.c

ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 renamed from ftdi_sio.c 2006-03-24 20:36:19.000000000 +0100 +1 -0
@@ -307,6 +307,7 @@
 
 
 static struct usb_device_id id_table_combined [] = {
+       { USB_DEVICE(PAPOUCHE_VENDOR, PAPOUCHE_THEM_PROD) },

What about:
s/PAPOUCHE_VENDOR/PAPOUCHE_VID/g
s/PAPOUCHE_THEM_PROD/PAPOUCHE_TMU_PID/g

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 line 20

Quoted 8 lines
ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 renamed from ftdi_sio.c 2006-03-24 20:36:19.000000000 +0100 +0 -0
        { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },

diff -uNrbBd old/ftdi_sio.h new/ftdi_sio.h

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 renamed from ftdi_sio.h 2006-03-24 20:36:19.000000000 +0100 +0 -0
@@ -20,8 +20,13 @@
  * Philipp Gühring - [email protected] - added the Device ID of the USB relais

You are not using UTF-8 capable MUA or editor or both, so the umlaut is broken here.

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 line 24

Quoted 4 lines
ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 renamed from ftdi_sio.h 2006-03-24 20:36:19.000000000 +0100 +2 -0
  * from Rudolf Gugler
  *
+ * Folkert van Heusden - [email protected] - added the device id of the
+ * temperature sensor from www.papouch.com

Credits are better with the PID/VID lines, not here. Just look at what other (most) people have done.

add at least the name [TMU] here

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 line 28

Quoted 4 lines
ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 renamed from ftdi_sio.h 2006-03-24 20:36:19.000000000 +0100 +2 -0
  */
 
+#define PAPOUCHE_VENDOR 0x5050
+#define PAPOUCHE_THEM_PROD 0x0400

+#define PAPOUCHE_VID 0x5050
+#define PAPOUCHE_TMU_PID 0x0400

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 line 32

Quoted 4 lines
ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 renamed from ftdi_sio.h 2006-03-24 20:36:19.000000000 +0100 +1 -0
+
 #define FTDI_VID       0x0403  /* Vendor Id */
 #define FTDI_SIO_PID   0x8372  /* Product Id SIO application of 8U100AX  */
 #define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */

IMHO, diff -ruN or diff -pruN should be better when posting patches :-)

Kalin.

Signature · 3 lines
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|
#2 lore raw
In reply to Folkert van Heusden
Quoted 7 lines · Folkert van Heusden

Hi,

The following patch against 2.6.15 adds support for the www.Papouch.com USB thermometer by adding the appropriate vendor and product id.

Signed off: Folkert van Heusden <[email protected]

It should be "Signed-off-by:".

ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100

Quoted 3 lines

diff -uNrbBd old/ftdi_sio.c new/ftdi_sio.c

ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 renamed from ftdi_sio.c 2006-03-24 20:36:19.000000000 +0100 +0 -0

Can you make it so I can apply the patch from the root of the kernel tree? Documentation/SubmittingPatches describes how to create a patch in this way.

ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 line 311

Quoted 6 lines
ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 renamed from ftdi_sio.c 2006-03-24 20:36:19.000000000 +0100 +1 -0
@@ -307,6 +307,7 @@
 
 
 static struct usb_device_id id_table_combined [] = {
+       { USB_DEVICE(PAPOUCHE_VENDOR, PAPOUCHE_THEM_PROD) },
        { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },

Your email client ate the tabs :(

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 line 24

Quoted 11 lines
ftdi_sio.c 2006-03-24 20:33:20.000000000 +0100 renamed from ftdi_sio.c 2006-03-24 20:36:19.000000000 +0100 +0 -0
        { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },

diff -uNrbBd old/ftdi_sio.h new/ftdi_sio.h

ftdi_sio.h 2006-03-24 20:37:35.000000000 +0100 renamed from ftdi_sio.h 2006-03-24 20:36:19.000000000 +0100 +2 -0
@@ -20,8 +20,13 @@
  * Philipp G?hring - [email protected] - added the Device ID of the USB relais
  * from Rudolf Gugler
  *
+ * Folkert van Heusden - [email protected] - added the device id of the
+ * temperature sensor from www.papouch.com

This information doesn't belong in the file, only in the changelog. It's not needed.

Care to redo this?

thanks,

greg k-h