[PATCH ipaq.c 2/3] Kernel option for comport selection
Andre Spahlinger <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Add a kernel option to select the usb endpoint pair to communicate with the device. This patch is from the synce project. diff -uprN a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c --- a/drivers/usb/serial/ipaq.c Tue Feb 20 06:34:32 2007 +++ b/drivers/usb/serial/ipaq.c Fri Feb 23 09:31:21 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); @@ -950,7 +960,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; @@ -978,6 +994,9 @@ MODULE_LICENSE("GPL"); module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Debug enabled or not"); + +module_param(ttyUSB, int, 0); +MODULE_PARM_DESC(ttyUSB, "User specified ttyUSB port number"); module_param(vendor, ushort, 0); MODULE_PARM_DESC(vendor, "User specified USB idVendor"); Signed-off-by: Andre Spahlinger <[email protected]> ------------------------------------------------------------------------- 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