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
a2b33c36
Commit
a2b33c36
authored
Feb 12, 2003
by
Vojtech Pavlik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Resurrect usb_set_report for Aiptek and Wacom tablets.
parent
b81c81a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
14 deletions
+29
-14
drivers/usb/input/aiptek.c
drivers/usb/input/aiptek.c
+17
-12
drivers/usb/input/wacom.c
drivers/usb/input/wacom.c
+12
-2
No files found.
drivers/usb/input/aiptek.c
View file @
a2b33c36
...
...
@@ -224,13 +224,18 @@ aiptek_close(struct input_dev *dev)
usb_unlink_urb
(
aiptek
->
irq
);
}
/*
* FIXME, either remove this call, or talk the maintainer into
* adding usb_set_report back into the core.
*/
#if 0
#define USB_REQ_SET_REPORT 0x09
static
int
usb_set_report
(
struct
usb_device
*
dev
,
struct
usb_host_interface
*
inter
,
unsigned
char
type
,
unsigned
char
id
,
void
*
buf
,
int
size
)
{
return
usb_control_msg
(
dev
,
usb_sndctrlpipe
(
dev
,
0
),
USB_REQ_SET_REPORT
,
USB_TYPE_CLASS
|
USB_RECIP_INTERFACE
,
(
type
<<
8
)
+
id
,
inter
->
desc
.
bInterfaceNumber
,
buf
,
size
,
HZ
);
}
static
void
aiptek_command(struct usb_device *dev,
unsigned int ifnum
,
aiptek_command
(
struct
usb_device
*
dev
,
struct
usb_host_interface
*
inter
,
unsigned
char
command
,
unsigned
char
data
)
{
__u8
buf
[
3
];
...
...
@@ -239,17 +244,17 @@ aiptek_command(struct usb_device *dev, unsigned int ifnum,
buf
[
1
]
=
command
;
buf
[
2
]
=
data
;
if (usb_set_report(dev, i
fnum
, 3, 2, buf, 3) != 3) {
if
(
usb_set_report
(
dev
,
i
nter
,
3
,
2
,
buf
,
3
)
!=
3
)
{
dbg
(
"aiptek_command: 0x%x 0x%x
\n
"
,
command
,
data
);
}
}
#endif
static
int
aiptek_probe
(
struct
usb_interface
*
intf
,
const
struct
usb_device_id
*
id
)
{
struct
usb_device
*
dev
=
interface_to_usbdev
(
intf
);
struct
usb_host_interface
*
interface
=
intf
->
altsetting
+
0
;
struct
usb_endpoint_descriptor
*
endpoint
;
struct
aiptek
*
aiptek
;
...
...
@@ -271,11 +276,11 @@ aiptek_probe(struct usb_interface *intf,
return
-
ENOMEM
;
}
/
/ Resolution500LPI
// aiptek_command(dev, ifnum
, 0x18, 0x04);
/
* Resolution500LPI */
aiptek_command
(
dev
,
interface
,
0x18
,
0x04
);
/
/ SwitchToTablet
// aiptek_command(dev, ifnum
, 0x10, 0x01);
/
* SwitchToTablet */
aiptek_command
(
dev
,
interface
,
0x10
,
0x01
);
aiptek
->
features
=
aiptek_features
+
id
->
driver_info
;
...
...
drivers/usb/input/wacom.c
View file @
a2b33c36
...
...
@@ -102,6 +102,17 @@ struct wacom {
char
phys
[
32
];
};
#define USB_REQ_SET_REPORT 0x09
static
int
usb_set_report
(
struct
usb_interface
*
intf
,
unsigned
char
type
,
unsigned
char
id
,
void
*
buf
,
int
size
)
{
return
usb_control_msg
(
interface_to_usbdev
(
intf
),
usb_sndctrlpipe
(
interface_to_usbdev
(
intf
),
0
),
USB_REQ_SET_REPORT
,
USB_TYPE_CLASS
|
USB_RECIP_INTERFACE
,
(
type
<<
8
)
+
id
,
intf
->
altsetting
[
0
].
desc
.
bInterfaceNumber
,
buf
,
size
,
HZ
);
}
static
void
wacom_pl_irq
(
struct
urb
*
urb
,
struct
pt_regs
*
regs
)
{
struct
wacom
*
wacom
=
urb
->
context
;
...
...
@@ -488,6 +499,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
{
struct
usb_device
*
dev
=
interface_to_usbdev
(
intf
);
struct
usb_endpoint_descriptor
*
endpoint
;
char
rep_data
[
2
]
=
{
0x02
,
0x02
};
struct
wacom
*
wacom
;
char
path
[
64
];
...
...
@@ -582,11 +594,9 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
input_register_device
(
&
wacom
->
dev
);
#if 0 /* Missing usb_set_report() */
usb_set_report
(
intf
,
3
,
2
,
rep_data
,
2
);
usb_set_report
(
intf
,
3
,
5
,
rep_data
,
0
);
usb_set_report
(
intf
,
3
,
6
,
rep_data
,
0
);
#endif
printk
(
KERN_INFO
"input: %s on %s
\n
"
,
wacom
->
features
->
name
,
path
);
...
...
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