[PATCH] ipaq.c combined patches from Synce Website

"Andre Spahlinger" <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Hi,

i combined the patches from the http://synce.sourceforge.net/synce/
webpage. Devices and the parameter ttyUSB will be added. With this parameter it is possible to change the port for devices with more than one endpoint. Succesfully tested with a yakumo delta device.

Regards

Andre


diff -Nurp a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
--- a/drivers/usb/serial/ipaq.c Wed Sep 20 03:42:06 2006
+++ b/drivers/usb/serial/ipaq.c Thu Jan 25 10:10:00 2007
@@ -9,6 +9,15 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
+ * (11/09/2004) Pascal
+ * Added vendor and product id for MiTAC Mio 168 which is also sold as
+ * Yakumo PDA delta 300 GPS and bluemedia PDA 255.
+ * Use modprobe ipaq ttyUSB=1 for them.
+ *
+ * (18/11/2003) Olivier
+ * Added insmod options to specify the ttyUSB port for new iPAQ
+ * Use modprobe ipaq ttyUSB=1 or ttyUSB=0
+ *
* (12/12/2002) ganesh
* Added support for practically all devices supported by ActiveSync
* on Windows. Thanks to Wes Cilldhaire <[email protected]>.
@@ -64,7 +73,7 @@
* Version Information
*/

-#define DRIVER_VERSION "v0.5"
+#define DRIVER_VERSION "v2.6.13.3.SynCE.1"
#define DRIVER_AUTHOR "Ganesh Varadarajan <[email protected]>"
#define DRIVER_DESC "USB PocketPC PDA driver"

@@ -72,6 +81,7 @@ static __u16 product, vendor;
static int debug;
static int connect_retries = KP_RETRIES;
static int initial_wait;
+static int ttyUSB = 0;

/* Function prototypes for an ipaq */
static int ipaq_open (struct usb_serial_port *port, struct file *filp);
@@ -247,6 +257,8 @@ static struct usb_device_id ipaq_id_tabl
{ USB_DEVICE(0x04AD, 0x0301) }, /* USB Sync 0301 */
{ USB_DEVICE(0x04AD, 0x0302) }, /* USB Sync 0302 */
{ USB_DEVICE(0x04AD, 0x0303) }, /* USB Sync 0303 */
+ { USB_DEVICE(0x04AD, 0x0306) }, /* GPS Pocket PC USB Sync */
+ { USB_DEVICE(0x04B7, 0x0531) }, /* MyGuide 7000 XL USB Sync */
{ USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */
{ USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */
{ USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */
@@ -294,6 +306,7 @@ static struct usb_device_id ipaq_id_tabl
{ USB_DEVICE(0x05E0, 0x2008) }, /* Symbol USB Sync 0x2008 */
{ USB_DEVICE(0x05E0, 0x2009) }, /* Symbol USB Sync 0x2009 */
{ USB_DEVICE(0x05E0, 0x200A) }, /* Symbol USB Sync 0x200A */
+ { USB_DEVICE(0x067E, 0x1001) }, /* Intermec 700 Color Mobile Computer */
{ USB_DEVICE(0x067E, 0x1001) }, /* Intermec Mobile Computer */
{ USB_DEVICE(0x07CF, 0x2001) }, /* CASIO USB Sync 2001 */
{ USB_DEVICE(0x07CF, 0x2002) }, /* CASIO USB Sync 2002 */
@@ -522,6 +535,7 @@ static struct usb_device_id ipaq_id_tabl
{ USB_DEVICE(0x3340, 0x1326) }, /* Itautec USB Sync */
{ USB_DEVICE(0x3340, 0x191C) }, /* YAKUMO USB Sync */
{ USB_DEVICE(0x3340, 0x2326) }, /* Vobis USB Sync */
+ { USB_DEVICE(0x3340, 0x3326) }, /* Medion USB Sync */
{ USB_DEVICE(0x3340, 0x3326) }, /* MEDION Winodws Moble USB Sync */
{ USB_DEVICE(0x3708, 0x20CE) }, /* Legend USB Sync */
{ USB_DEVICE(0x3708, 0x21CE) }, /* Lenovo USB Sync */
@@ -940,7 +954,13 @@ static int __init ipaq_init(void)
ipaq_id_table[0].idVendor = vendor;
ipaq_id_table[0].idProduct = product;
}
+
+ ipaq_device.num_bulk_in = ttyUSB + 1;
+ ipaq_device.num_bulk_out = ttyUSB + 1;
+ ipaq_device.num_ports = ttyUSB + 1;
+
retval = usb_register(&ipaq_driver);
+ dbg("%s - iPAQ module configured for port ttyUSB%d", __FUNCTION__, ttyUSB);
if (retval)
goto failed_usb_register;

@@ -968,6 +988,9 @@ MODULE_LICENSE("GPL");

module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+module_param(ttyUSB, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(ttyUSB, "User specified ttyUSB port number");

module_param(vendor, ushort, 0);
MODULE_PARM_DESC(vendor, "User specified USB idVendor");
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.