Commit db9946bf authored by Ganesh Varadarajan's avatar Ganesh Varadarajan Committed by Greg Kroah-Hartman

usb ipaq driver:

  	Added support for the HP Jornada.
parent 94f991d0
...@@ -95,12 +95,13 @@ HandSpring Visor, Palm USB, and Cli ...@@ -95,12 +95,13 @@ HandSpring Visor, Palm USB, and Cli
Kroah-Hartman at greg@kroah.com Kroah-Hartman at greg@kroah.com
Compaq iPAQ driver Compaq iPAQ and HP Jornada driver
This driver can be used to connect to Compaq iPAQ PDAs running This driver can be used to connect to Compaq iPAQ and HP Jornada PDAs
Windows CE 3.0 using a USB autosync cable. It has been tested only on running Windows CE 3.0 or PocketPC 2002 using a USB cable/cradle. It
the Compaq H3135. It should work with the H3600 and later models too. has been tested only on the Compaq H3135, but is rumoured to work on
It may work with other CE based handhelds as well. with the H3600 and later models as well as the Jornada 548 and 568.
With minor modifications, it may work for other CE based handhelds too.
The driver presents a serial interface (usually on /dev/ttyUSB0) over The driver presents a serial interface (usually on /dev/ttyUSB0) over
which one may run ppp and establish a TCP/IP link to the iPAQ. Once this which one may run ppp and establish a TCP/IP link to the iPAQ. Once this
...@@ -109,11 +110,14 @@ Compaq iPAQ driver ...@@ -109,11 +110,14 @@ Compaq iPAQ driver
kbytes/sec for download/upload to the iPAQ. kbytes/sec for download/upload to the iPAQ.
The driver works intermittently with the usb-uhci driver but quite The driver works intermittently with the usb-uhci driver but quite
reliably with the uhci driver. Make sure you have the right driver reliably with the uhci driver. However, performance is much better
loaded - usb-uhci is often the default. with usb-uhci. It does not seem to work with ohci at all.
You must setup hotplug to invoke pppd as soon as the iPAQ is connected. You must setup hotplug to invoke pppd as soon as the iPAQ is connected.
A ppp script like the one below may be used: A ppp script like the one below should be kept in the file
/etc/hotplug/usb/ipaq Remember to chmod +x. Make sure there are no
options in /etc/ppp/options or ~/.ppprc which conflict with the ones
given below.
#!/bin/bash #!/bin/bash
...@@ -133,7 +137,7 @@ Compaq iPAQ driver ...@@ -133,7 +137,7 @@ Compaq iPAQ driver
On connecting the cable, you should see the usual "Device Connected", On connecting the cable, you should see the usual "Device Connected",
"User Authenticated" messages flash by on your iPAQ. Once connected, "User Authenticated" messages flash by on your iPAQ. Once connected,
you can use Win CE programs like ftpView, Pocket Outlook from the iPAQ you can use Win CE programs like ftpView, Pocket Outlook from the iPAQ
and other synce utilities from the Linux side. Remember to enable IP and xcerdisp, synce utilities from the Linux side. Remember to enable IP
forwarding. forwarding.
To use Pocket IE, follow the instructions given at To use Pocket IE, follow the instructions given at
......
...@@ -40,9 +40,10 @@ CONFIG_USB_SERIAL_VISOR ...@@ -40,9 +40,10 @@ CONFIG_USB_SERIAL_VISOR
module, say M here and read <file:Documentation/modules.txt>. module, say M here and read <file:Documentation/modules.txt>.
CONFIG_USB_SERIAL_IPAQ CONFIG_USB_SERIAL_IPAQ
Say Y here if you want to connect to your Compaq iPAQ running Say Y here if you want to connect to your Compaq iPAQ or HP Jornada
Windows CE 3.0 using a USB autosync cable. For information on using 548/568 running Windows CE 3.0 or PocketPC 2002 using a USB
the driver, read <file:Documentation/usb/usb-serial.txt>. cradle/cable. For information on using the driver,
read <file:Documentation/usb/usb-serial.txt>.
This code is also available as a module ( = code which can be This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want). inserted in and removed from the running kernel whenever you want).
......
...@@ -15,7 +15,7 @@ dep_tristate ' USB Digi International AccelePort USB Serial Driver' CONFIG_USB_ ...@@ -15,7 +15,7 @@ dep_tristate ' USB Digi International AccelePort USB Serial Driver' CONFIG_USB_
dep_tristate ' USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL dep_tristate ' USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
dep_tristate ' USB Compaq iPAQ Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL dep_tristate ' USB Compaq iPAQ / HP Jornada Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
dep_tristate ' USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
dep_tristate ' USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
......
/* /*
* USB Compaq iPAQ driver * USB Compaq iPAQ driver
* *
* Copyright (C) 2001 * Copyright (C) 2001 - 2002
* Ganesh Varadarajan <ganesh@veritas.com> * Ganesh Varadarajan <ganesh@veritas.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* (25/2/2002) ganesh
* Added support for the HP Jornada 548 and 568. Completely untested.
* Thanks to info from Heath Robinson and Arieh Davidoff.
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -39,9 +42,9 @@ ...@@ -39,9 +42,9 @@
/* /*
* Version Information * Version Information
*/ */
#define DRIVER_VERSION "v0.1" #define DRIVER_VERSION "v0.2"
#define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>" #define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>"
#define DRIVER_DESC "USB Compaq iPAQ driver" #define DRIVER_DESC "USB Compaq iPAQ, HP Jornada driver"
/* Function prototypes for an ipaq */ /* Function prototypes for an ipaq */
static int ipaq_open (struct usb_serial_port *port, struct file *filp); static int ipaq_open (struct usb_serial_port *port, struct file *filp);
...@@ -61,7 +64,9 @@ static void ipaq_destroy_lists(struct usb_serial_port *port); ...@@ -61,7 +64,9 @@ static void ipaq_destroy_lists(struct usb_serial_port *port);
static __devinitdata struct usb_device_id ipaq_id_table [] = { static __devinitdata struct usb_device_id ipaq_id_table [] = {
{ USB_DEVICE(IPAQ_VENDOR_ID, IPAQ_PRODUCT_ID) }, { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -72,7 +77,7 @@ struct usb_serial_device_type ipaq_device = { ...@@ -72,7 +77,7 @@ struct usb_serial_device_type ipaq_device = {
owner: THIS_MODULE, owner: THIS_MODULE,
name: "Compaq iPAQ", name: "Compaq iPAQ",
id_table: ipaq_id_table, id_table: ipaq_id_table,
num_interrupt_in: 0, num_interrupt_in: NUM_DONT_CARE,
num_bulk_in: 1, num_bulk_in: 1,
num_bulk_out: 1, num_bulk_out: 1,
num_ports: 1, num_ports: 1,
...@@ -104,8 +109,6 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) ...@@ -104,8 +109,6 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
dbg(__FUNCTION__ " - port %d", port->number); dbg(__FUNCTION__ " - port %d", port->number);
down(&port->sem);
++port->open_count; ++port->open_count;
if (port->open_count == 1) { if (port->open_count == 1) {
...@@ -193,8 +196,6 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) ...@@ -193,8 +196,6 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
} }
} }
up(&port->sem);
return result; return result;
enomem: enomem:
...@@ -220,8 +221,6 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp) ...@@ -220,8 +221,6 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp)
if (!serial) if (!serial)
return; return;
down (&port->sem);
--port->open_count; --port->open_count;
if (port->open_count <= 0) { if (port->open_count <= 0) {
...@@ -238,8 +237,6 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp) ...@@ -238,8 +237,6 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp)
port->open_count = 0; port->open_count = 0;
} }
up (&port->sem);
/* Uncomment the following line if you want to see some statistics in your syslog */ /* Uncomment the following line if you want to see some statistics in your syslog */
/* info ("Bytes In = %d Bytes Out = %d", bytes_in, bytes_out); */ /* info ("Bytes In = %d Bytes Out = %d", bytes_in, bytes_out); */
} }
......
/* /*
* USB Compaq iPAQ driver * USB Compaq iPAQ driver
* *
* Copyright (C) 2001 * Copyright (C) 2001 - 2002
* Ganesh Varadarajan <ganesh@veritas.com> * Ganesh Varadarajan <ganesh@veritas.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -16,8 +16,12 @@ ...@@ -16,8 +16,12 @@
#define __LINUX_USB_SERIAL_IPAQ_H #define __LINUX_USB_SERIAL_IPAQ_H
#define IPAQ_VENDOR_ID 0x049f #define COMPAQ_VENDOR_ID 0x049f
#define IPAQ_PRODUCT_ID 0x0003 #define COMPAQ_IPAQ_ID 0x0003
#define HP_VENDOR_ID 0x003f
#define HP_JORNADA_548_ID 0x1016
#define HP_JORNADA_568_ID 0x1116
/* /*
* Since we can't queue our bulk write urbs (don't know why - it just * Since we can't queue our bulk write urbs (don't know why - it just
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment