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
19079579
Commit
19079579
authored
Jan 16, 2004
by
Johann Deneux
Committed by
Vojtech Pavlik
Jan 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: Fixes and updates of the USB ForceFeedback drivers.
Added Logitech MOMO FF steering wheel ID.
parent
5ca3f1f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+3
-3
drivers/usb/input/hid-ff.c
drivers/usb/input/hid-ff.c
+5
-4
drivers/usb/input/hid-lgff.c
drivers/usb/input/hid-lgff.c
+10
-11
No files found.
drivers/usb/input/hid-core.c
View file @
19079579
...
...
@@ -1529,9 +1529,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
continue
;
if
(
!
(
hid
->
urbout
=
usb_alloc_urb
(
0
,
GFP_KERNEL
)))
goto
fail
;
pipe
=
usb_snd
bulk
pipe
(
dev
,
endpoint
->
bEndpointAddress
);
usb_fill_
bulk
_urb
(
hid
->
urbout
,
dev
,
pipe
,
hid
->
outbuf
,
0
,
hid_irq_out
,
hid
);
pipe
=
usb_snd
int
pipe
(
dev
,
endpoint
->
bEndpointAddress
);
usb_fill_
int
_urb
(
hid
->
urbout
,
dev
,
pipe
,
hid
->
outbuf
,
0
,
hid_irq_out
,
hid
,
1
);
hid
->
urbout
->
transfer_dma
=
hid
->
outbuf_dma
;
hid
->
urbout
->
transfer_flags
|=
URB_NO_TRANSFER_DMA_MAP
;
}
...
...
drivers/usb/input/hid-ff.c
View file @
19079579
...
...
@@ -5,7 +5,7 @@
* Not all hid devices use the same protocol. For example, some use PID,
* other use their own proprietary procotol.
*
* Copyright (c) 2002 Johann Deneux
* Copyright (c) 2002
-2004
Johann Deneux
*/
/*
...
...
@@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so by
* e-mail - mail your message to <
deneux@ifrance.com
>
* e-mail - mail your message to <
johann.deneux@it.uu.se
>
*/
#include <linux/input.h>
...
...
@@ -52,8 +52,9 @@ struct hid_ff_initializer {
static
struct
hid_ff_initializer
inits
[]
=
{
#ifdef CONFIG_LOGITECH_FF
{
0x46d
,
0xc211
,
hid_lgff_init
},
{
0x46d
,
0xc283
,
hid_lgff_init
},
{
0x46d
,
0xc211
,
hid_lgff_init
},
// Logitech Cordless rumble pad
{
0x46d
,
0xc283
,
hid_lgff_init
},
// Logitech Wingman Force 3d
{
0x46d
,
0xc295
,
hid_lgff_init
},
// Logitech MOMO force wheel
#endif
#ifdef CONFIG_HID_PID
{
0x45e
,
0x001b
,
hid_pid_init
},
...
...
drivers/usb/input/hid-lgff.c
View file @
19079579
...
...
@@ -6,7 +6,7 @@
* - WingMan Cordless RumblePad
* - WingMan Force 3D
*
* Copyright (c) 2002 Johann Deneux
* Copyright (c) 2002
-2004
Johann Deneux
*/
/*
...
...
@@ -25,13 +25,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so by
* e-mail - mail your message to <
deneux@ifrance.com
>
* e-mail - mail your message to <
johann.deneux@it.uu.se
>
*/
#include <linux/input.h>
#include <linux/sched.h>
#define DEBUG
//
#define DEBUG
#include <linux/usb.h>
#include <linux/circ_buf.h>
...
...
@@ -179,8 +179,7 @@ int hid_lgff_init(struct hid_device* hid)
kfree
(
private
);
return
-
1
;
}
private
->
rumble
->
field
[
0
]
->
value
[
0
]
=
0x03
;
private
->
rumble
->
field
[
0
]
->
value
[
1
]
=
0x42
;
private
->
rumble
->
field
[
0
]
->
value
[
0
]
=
0x42
;
private
->
condition
=
hid_lgff_duplicate_report
(
report
);
...
...
@@ -207,7 +206,7 @@ int hid_lgff_init(struct hid_device* hid)
add_timer
(
&
private
->
timer
);
/*TODO: only run the timer when at least
one effect is playing */
printk
(
KERN_INFO
"Force feedback for Logitech force feedback devices by Johann Deneux <
deneux@ifrance.com
>
\n
"
);
printk
(
KERN_INFO
"Force feedback for Logitech force feedback devices by Johann Deneux <
johann.deneux@it.uu.se
>
\n
"
);
return
0
;
}
...
...
@@ -254,7 +253,7 @@ static void hid_lgff_input_init(struct hid_device* hid)
signed
short
*
ff
;
u16
idVendor
=
hid
->
dev
->
descriptor
.
idVendor
;
u16
idProduct
=
hid
->
dev
->
descriptor
.
idProduct
;
struct
hid_input
*
hidinput
=
list_entry
(
&
hid
->
inputs
,
struct
hid_input
,
list
);
struct
hid_input
*
hidinput
=
list_entry
(
hid
->
inputs
.
next
,
struct
hid_input
,
list
);
while
(
dev
->
idVendor
&&
(
idVendor
!=
dev
->
idVendor
||
idProduct
!=
dev
->
idProduct
))
dev
++
;
...
...
@@ -511,10 +510,10 @@ static void hid_lgff_timer(unsigned long timer_data)
hid_submit_report
(
hid
,
lgff
->
constant
,
USB_DIR_OUT
);
}
if
(
left
!=
lgff
->
rumble
->
field
[
0
]
->
value
[
3
]
||
right
!=
lgff
->
rumble
->
field
[
0
]
->
value
[
4
])
{
lgff
->
rumble
->
field
[
0
]
->
value
[
3
]
=
left
;
lgff
->
rumble
->
field
[
0
]
->
value
[
4
]
=
right
;
if
(
left
!=
lgff
->
rumble
->
field
[
0
]
->
value
[
2
]
||
right
!=
lgff
->
rumble
->
field
[
0
]
->
value
[
3
])
{
lgff
->
rumble
->
field
[
0
]
->
value
[
2
]
=
left
;
lgff
->
rumble
->
field
[
0
]
->
value
[
3
]
=
right
;
dbg
(
"(left,right)=(%04x, %04x)"
,
left
,
right
);
hid_submit_report
(
hid
,
lgff
->
rumble
,
USB_DIR_OUT
);
}
...
...
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