Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f41a1db9
Commit
f41a1db9
authored
Mar 04, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: add support for Treo devices to the visor driver.
Finally...
parent
ebd158e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
1 deletion
+48
-1
drivers/usb/serial/visor.c
drivers/usb/serial/visor.c
+48
-1
No files found.
drivers/usb/serial/visor.c
View file @
f41a1db9
...
...
@@ -12,6 +12,9 @@
*
* See Documentation/usb/usb-serial.txt for more information on using this driver
*
* (03/05/2003) gkh
* Think Treo support is now working.
*
* (04/03/2002) gkh
* Added support for the Sony OS 4.1 devices. Thanks to Hiroyuki ARAKI
* <hiro@zob.ne.jp> for the information.
...
...
@@ -156,7 +159,7 @@
/*
* Version Information
*/
#define DRIVER_VERSION "v2.
0
"
#define DRIVER_VERSION "v2.
1
"
#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
#define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony Clié driver"
...
...
@@ -177,6 +180,7 @@ static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs);
static
void
visor_read_bulk_callback
(
struct
urb
*
urb
,
struct
pt_regs
*
regs
);
static
void
visor_read_int_callback
(
struct
urb
*
urb
,
struct
pt_regs
*
regs
);
static
int
clie_3_5_startup
(
struct
usb_serial
*
serial
);
static
int
treo_attach
(
struct
usb_serial
*
serial
);
static
int
palm_os_3_probe
(
struct
usb_serial
*
serial
,
const
struct
usb_device_id
*
id
);
static
int
palm_os_4_probe
(
struct
usb_serial
*
serial
,
const
struct
usb_device_id
*
id
);
...
...
@@ -262,6 +266,7 @@ static struct usb_serial_device_type handspring_device = {
.
close
=
visor_close
,
.
throttle
=
visor_throttle
,
.
unthrottle
=
visor_unthrottle
,
.
attach
=
treo_attach
,
.
probe
=
visor_probe
,
.
calc_num_ports
=
visor_calc_num_ports
,
.
shutdown
=
visor_shutdown
,
...
...
@@ -801,6 +806,48 @@ static int clie_3_5_startup (struct usb_serial *serial)
return
0
;
}
static
int
treo_attach
(
struct
usb_serial
*
serial
)
{
struct
usb_serial_port
*
port
;
int
i
;
/* Only do this endpoint hack for the Handspring devices with
* interrupt in endpoints, which for now are the Treo devices. */
if
((
serial
->
dev
->
descriptor
.
idVendor
!=
HANDSPRING_VENDOR_ID
)
||
(
serial
->
num_interrupt_in
==
0
))
return
0
;
dbg
(
"%s"
,
__FUNCTION__
);
/* Ok, this is pretty ugly, but these devices want to use the
* interrupt endpoint as paired up with a bulk endpoint for a
* "virtual serial port". So let's force the endpoints to be
* where we want them to be. */
for
(
i
=
serial
->
num_bulk_in
;
i
<
serial
->
num_ports
;
++
i
)
{
port
=
&
serial
->
port
[
i
];
port
->
read_urb
=
serial
->
port
[
0
].
read_urb
;
port
->
bulk_in_endpointAddress
=
serial
->
port
[
0
].
bulk_in_endpointAddress
;
port
->
bulk_in_buffer
=
serial
->
port
[
0
].
bulk_in_buffer
;
}
for
(
i
=
serial
->
num_bulk_out
;
i
<
serial
->
num_ports
;
++
i
)
{
port
=
&
serial
->
port
[
i
];
port
->
write_urb
=
serial
->
port
[
0
].
write_urb
;
port
->
bulk_out_size
=
serial
->
port
[
0
].
bulk_out_size
;
port
->
bulk_out_endpointAddress
=
serial
->
port
[
0
].
bulk_out_endpointAddress
;
port
->
bulk_out_buffer
=
serial
->
port
[
0
].
bulk_out_buffer
;
}
for
(
i
=
serial
->
num_interrupt_in
;
i
<
serial
->
num_ports
;
++
i
)
{
port
=
&
serial
->
port
[
i
];
port
->
interrupt_in_urb
=
serial
->
port
[
0
].
interrupt_in_urb
;
port
->
interrupt_in_endpointAddress
=
serial
->
port
[
0
].
interrupt_in_endpointAddress
;
port
->
interrupt_in_buffer
=
serial
->
port
[
0
].
interrupt_in_buffer
;
}
return
0
;
}
static
void
visor_shutdown
(
struct
usb_serial
*
serial
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment