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
447753d9
Commit
447753d9
authored
Dec 07, 2009
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'bkl-removal', 'upstream' and 'upstream-fixes' into for-linus
parents
6ec22f9b
6c857730
24985cf6
9db630b4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
17 deletions
+61
-17
drivers/hid/hid-core.c
drivers/hid/hid-core.c
+7
-2
drivers/hid/hid-cypress.c
drivers/hid/hid-cypress.c
+2
-0
drivers/hid/hid-ids.h
drivers/hid/hid-ids.h
+7
-0
drivers/hid/hid-lg.c
drivers/hid/hid-lg.c
+33
-0
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-core.c
+6
-6
drivers/hid/usbhid/hid-pidff.c
drivers/hid/usbhid/hid-pidff.c
+2
-3
drivers/hid/usbhid/hid-quirks.c
drivers/hid/usbhid/hid-quirks.c
+3
-1
drivers/hid/usbhid/hiddev.c
drivers/hid/usbhid/hiddev.c
+0
-5
include/linux/hid.h
include/linux/hid.h
+1
-0
No files found.
drivers/hid/hid-core.c
View file @
447753d9
...
...
@@ -39,8 +39,6 @@
* Version Information
*/
#define DRIVER_VERSION "v2.6"
#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
#define DRIVER_DESC "HID core driver"
#define DRIVER_LICENSE "GPL"
...
...
@@ -1294,6 +1292,7 @@ static const struct hid_device_id hid_blacklist[] = {
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CHICONY
,
USB_DEVICE_ID_CHICONY_TACTICAL_PAD
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_BARCODE_1
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_BARCODE_2
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_BARCODE_3
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_MOUSE
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_DRAGONRISE
,
0x0006
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_EZKEY
,
USB_DEVICE_ID_BTC_8193
)
},
...
...
@@ -1326,6 +1325,8 @@ static const struct hid_device_id hid_blacklist[] = {
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_LOGITECH_G25_WHEEL
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_LOGITECH_RUMBLEPAD2
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_SPACETRAVELLER
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_SPACENAVIGATOR
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_MICROSOFT
,
USB_DEVICE_ID_SIDEWINDER_GV
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_MICROSOFT
,
USB_DEVICE_ID_MS_NE4K
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_MICROSOFT
,
USB_DEVICE_ID_MS_LK6K
)
},
...
...
@@ -1620,6 +1621,7 @@ static const struct hid_device_id hid_ignore_list[] = {
{
HID_USB_DEVICE
(
USB_VENDOR_ID_KBGEAR
,
USB_DEVICE_ID_KBGEAR_JAMSTUDIO
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_KWORLD
,
USB_DEVICE_ID_KWORLD_RADIO_FM700
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_KYE
,
USB_DEVICE_ID_KYE_GPEN_560
)
},
{
HID_BLUETOOTH_DEVICE
(
USB_VENDOR_ID_KYE
,
0x0058
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LD
,
USB_DEVICE_ID_LD_CASSY
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LD
,
USB_DEVICE_ID_LD_POCKETCASSY
)
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LD
,
USB_DEVICE_ID_LD_MOBILECASSY
)
},
...
...
@@ -1918,5 +1920,8 @@ static void __exit hid_exit(void)
module_init
(
hid_init
);
module_exit
(
hid_exit
);
MODULE_AUTHOR
(
"Andreas Gal"
);
MODULE_AUTHOR
(
"Vojtech Pavlik"
);
MODULE_AUTHOR
(
"Jiri Kosina"
);
MODULE_LICENSE
(
DRIVER_LICENSE
);
drivers/hid/hid-cypress.c
View file @
447753d9
...
...
@@ -126,6 +126,8 @@ static const struct hid_device_id cp_devices[] = {
.
driver_data
=
CP_RDESC_SWAPPED_MIN_MAX
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_BARCODE_2
),
.
driver_data
=
CP_RDESC_SWAPPED_MIN_MAX
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_BARCODE_3
),
.
driver_data
=
CP_RDESC_SWAPPED_MIN_MAX
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_MOUSE
),
.
driver_data
=
CP_2WHEEL_MOUSE_HACK
},
{
}
...
...
drivers/hid/hid-ids.h
View file @
447753d9
...
...
@@ -117,6 +117,7 @@
#define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2
#define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4
#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff
#define USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK 0x00d3
#define USB_VENDOR_ID_CHERRY 0x046a
#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
...
...
@@ -145,6 +146,7 @@
#define USB_DEVICE_ID_CYPRESS_ULTRAMOUSE 0x7417
#define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61
#define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64
#define USB_DEVICE_ID_CYPRESS_BARCODE_3 0xbca1
#define USB_VENDOR_ID_DEALEXTREAME 0x10c5
#define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a
...
...
@@ -304,6 +306,8 @@
#define USB_DEVICE_ID_S510_RECEIVER_2 0xc517
#define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512
#define USB_DEVICE_ID_MX3000_RECEIVER 0xc513
#define USB_DEVICE_ID_SPACETRAVELLER 0xc623
#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626
#define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704
#define USB_DEVICE_ID_DINOVO_EDGE 0xc714
#define USB_DEVICE_ID_DINOVO_MINI 0xc71f
...
...
@@ -346,6 +350,9 @@
#define USB_VENDOR_ID_NEC 0x073e
#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301
#define USB_VENDOR_ID_NEXTWINDOW 0x1926
#define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003
#define USB_VENDOR_ID_NTRIG 0x1b96
#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001
...
...
drivers/hid/hid-lg.c
View file @
447753d9
...
...
@@ -33,6 +33,7 @@
#define LG_NOGET 0x100
#define LG_FF 0x200
#define LG_FF2 0x400
#define LG_RDESC_REL_ABS 0x800
/*
* Certain Logitech keyboards send in report #3 keys which are far
...
...
@@ -51,6 +52,13 @@ static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
rdesc
[
84
]
=
rdesc
[
89
]
=
0x4d
;
rdesc
[
85
]
=
rdesc
[
90
]
=
0x10
;
}
if
((
quirks
&
LG_RDESC_REL_ABS
)
&&
rsize
>=
50
&&
rdesc
[
32
]
==
0x81
&&
rdesc
[
33
]
==
0x06
&&
rdesc
[
49
]
==
0x81
&&
rdesc
[
50
]
==
0x06
)
{
dev_info
(
&
hdev
->
dev
,
"fixing up rel/abs in Logitech "
"report descriptor
\n
"
);
rdesc
[
33
]
=
rdesc
[
50
]
=
0x02
;
}
}
#define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \
...
...
@@ -89,6 +97,22 @@ static int lg_ultrax_remote_mapping(struct hid_input *hi,
return
1
;
}
static
int
lg_dinovo_mapping
(
struct
hid_input
*
hi
,
struct
hid_usage
*
usage
,
unsigned
long
**
bit
,
int
*
max
)
{
if
((
usage
->
hid
&
HID_USAGE_PAGE
)
!=
HID_UP_LOGIVENDOR
)
return
0
;
switch
(
usage
->
hid
&
HID_USAGE
)
{
case
0x00d
:
lg_map_key_clear
(
KEY_MEDIA
);
break
;
default:
return
0
;
}
return
1
;
}
static
int
lg_wireless_mapping
(
struct
hid_input
*
hi
,
struct
hid_usage
*
usage
,
unsigned
long
**
bit
,
int
*
max
)
{
...
...
@@ -164,6 +188,10 @@ static int lg_input_mapping(struct hid_device *hdev, struct hid_input *hi,
lg_ultrax_remote_mapping
(
hi
,
usage
,
bit
,
max
))
return
1
;
if
(
hdev
->
product
==
USB_DEVICE_ID_DINOVO_MINI
&&
lg_dinovo_mapping
(
hi
,
usage
,
bit
,
max
))
return
1
;
if
((
quirks
&
LG_WIRELESS
)
&&
lg_wireless_mapping
(
hi
,
usage
,
bit
,
max
))
return
1
;
...
...
@@ -303,8 +331,13 @@ static const struct hid_device_id lg_devices[] = {
.
driver_data
=
LG_FF
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_LOGITECH_RUMBLEPAD2
),
.
driver_data
=
LG_FF2
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_SPACENAVIGATOR
),
.
driver_data
=
LG_RDESC_REL_ABS
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_LOGITECH
,
USB_DEVICE_ID_SPACETRAVELLER
),
.
driver_data
=
LG_RDESC_REL_ABS
},
{
}
};
MODULE_DEVICE_TABLE
(
hid
,
lg_devices
);
static
struct
hid_driver
lg_driver
=
{
...
...
drivers/hid/usbhid/hid-core.c
View file @
447753d9
...
...
@@ -41,8 +41,6 @@
* Version Information
*/
#define DRIVER_VERSION "v2.6"
#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
#define DRIVER_DESC "USB HID core driver"
#define DRIVER_LICENSE "GPL"
...
...
@@ -998,6 +996,7 @@ static int usbhid_start(struct hid_device *hid)
usbhid
->
urbctrl
->
transfer_dma
=
usbhid
->
ctrlbuf_dma
;
usbhid
->
urbctrl
->
transfer_flags
|=
(
URB_NO_TRANSFER_DMA_MAP
|
URB_NO_SETUP_DMA_MAP
);
if
(
!
(
hid
->
quirks
&
HID_QUIRK_NO_INIT_REPORTS
))
usbhid_init_reports
(
hid
);
set_bit
(
HID_STARTED
,
&
usbhid
->
iofl
);
...
...
@@ -1395,8 +1394,7 @@ static int __init hid_init(void)
retval
=
usb_register
(
&
hid_driver
);
if
(
retval
)
goto
usb_register_fail
;
printk
(
KERN_INFO
KBUILD_MODNAME
": "
DRIVER_VERSION
":"
DRIVER_DESC
"
\n
"
);
printk
(
KERN_INFO
KBUILD_MODNAME
": "
DRIVER_DESC
"
\n
"
);
return
0
;
usb_register_fail:
...
...
@@ -1423,6 +1421,8 @@ static void __exit hid_exit(void)
module_init
(
hid_init
);
module_exit
(
hid_exit
);
MODULE_AUTHOR
(
DRIVER_AUTHOR
);
MODULE_AUTHOR
(
"Andreas Gal"
);
MODULE_AUTHOR
(
"Vojtech Pavlik"
);
MODULE_AUTHOR
(
"Jiri Kosina"
);
MODULE_DESCRIPTION
(
DRIVER_DESC
);
MODULE_LICENSE
(
DRIVER_LICENSE
);
drivers/hid/usbhid/hid-pidff.c
View file @
447753d9
...
...
@@ -1181,12 +1181,11 @@ static void pidff_reset(struct pidff_device *pidff)
usbhid_wait_io
(
hid
);
if
(
pidff
->
pool
[
PID_SIMULTANEOUS_MAX
].
value
)
{
int
sim_effects
=
pidff
->
pool
[
PID_SIMULTANEOUS_MAX
].
value
[
0
];
while
(
sim_effects
<
2
)
{
while
(
pidff
->
pool
[
PID_SIMULTANEOUS_MAX
].
value
[
0
]
<
2
)
{
if
(
i
++
>
20
)
{
printk
(
KERN_WARNING
"hid-pidff: device reports "
"%d simultaneous effects
\n
"
,
sim_effects
);
pidff
->
pool
[
PID_SIMULTANEOUS_MAX
].
value
[
0
]
);
break
;
}
debug
(
"pid_pool requested again"
);
...
...
drivers/hid/usbhid/hid-quirks.c
View file @
447753d9
...
...
@@ -37,6 +37,7 @@ static const struct hid_blacklist {
{
USB_VENDOR_ID_HAPP
,
USB_DEVICE_ID_UGCI_FIGHTING
,
HID_QUIRK_BADPAD
|
HID_QUIRK_MULTI_INPUT
},
{
USB_VENDOR_ID_NATSU
,
USB_DEVICE_ID_NATSU_GAMEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_NEC
,
USB_DEVICE_ID_NEC_USB_GAME_PAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_NEXTWINDOW
,
USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN
,
HID_QUIRK_MULTI_INPUT
},
{
USB_VENDOR_ID_SAITEK
,
USB_DEVICE_ID_SAITEK_RUMBLEPAD
,
HID_QUIRK_BADPAD
},
{
USB_VENDOR_ID_TOPMAX
,
USB_DEVICE_ID_TOPMAX_COBRAPAD
,
HID_QUIRK_BADPAD
},
...
...
@@ -53,6 +54,7 @@ static const struct hid_blacklist {
{
USB_VENDOR_ID_CH
,
USB_DEVICE_ID_CH_COMBATSTICK
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_CH
,
USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_CH
,
USB_DEVICE_ID_CH_PRO_PEDALS
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_CH
,
USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_DMI
,
USB_DEVICE_ID_DMI_ENC
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_ELO
,
USB_DEVICE_ID_ELO_TS2700
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_SUN
,
USB_DEVICE_ID_RARITAN_KVM_DONGLE
,
HID_QUIRK_NOGET
},
...
...
@@ -280,7 +282,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
if
(
idVendor
==
USB_VENDOR_ID_NCR
&&
idProduct
>=
USB_DEVICE_ID_NCR_FIRST
&&
idProduct
<=
USB_DEVICE_ID_NCR_LAST
)
return
HID_QUIRK_NO
GET
;
return
HID_QUIRK_NO
_INIT_REPORTS
;
down_read
(
&
dquirks_rwsem
);
bl_entry
=
usbhid_exists_dquirk
(
idVendor
,
idProduct
);
...
...
drivers/hid/usbhid/hiddev.c
View file @
447753d9
...
...
@@ -450,7 +450,6 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
uref_multi
=
kmalloc
(
sizeof
(
struct
hiddev_usage_ref_multi
),
GFP_KERNEL
);
if
(
!
uref_multi
)
return
-
ENOMEM
;
lock_kernel
();
uref
=
&
uref_multi
->
uref
;
if
(
cmd
==
HIDIOCGUSAGES
||
cmd
==
HIDIOCSUSAGES
)
{
if
(
copy_from_user
(
uref_multi
,
user_arg
,
...
...
@@ -528,7 +527,6 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
case
HIDIOCGCOLLECTIONINDEX
:
i
=
field
->
usage
[
uref
->
usage_index
].
collection_index
;
unlock_kernel
();
kfree
(
uref_multi
);
return
i
;
case
HIDIOCGUSAGES
:
...
...
@@ -547,15 +545,12 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
}
goodreturn:
unlock_kernel
();
kfree
(
uref_multi
);
return
0
;
fault:
unlock_kernel
();
kfree
(
uref_multi
);
return
-
EFAULT
;
inval:
unlock_kernel
();
kfree
(
uref_multi
);
return
-
EINVAL
;
}
...
...
include/linux/hid.h
View file @
447753d9
...
...
@@ -312,6 +312,7 @@ struct hid_item {
#define HID_QUIRK_MULTI_INPUT 0x00000040
#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
/*
* This is the global environment of the parser. This information is
...
...
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