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
Kirill Smelkov
linux
Commits
c35f31fc
Commit
c35f31fc
authored
Feb 23, 2021
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-5.12/sony' into for-linus
- tilt support on Sony Guitar Hero devices from Sanjay Govind
parents
e2adf27e
32e411d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
drivers/hid/Kconfig
drivers/hid/Kconfig
+1
-0
drivers/hid/hid-ids.h
drivers/hid/hid-ids.h
+5
-1
drivers/hid/hid-sony.c
drivers/hid/hid-sony.c
+14
-6
No files found.
drivers/hid/Kconfig
View file @
c35f31fc
...
...
@@ -927,6 +927,7 @@ config HID_SONY
* Sony PS3 Blue-ray Disk Remote Control (Bluetooth)
* Logitech Harmony adapter for Sony Playstation 3 (Bluetooth)
* Guitar Hero Live PS3 and Wii U guitar dongles
* Guitar Hero PS3 and PC guitar dongles
config SONY_FF
bool "Sony PS2/3/4 accessories force feedback support"
...
...
drivers/hid/hid-ids.h
View file @
c35f31fc
...
...
@@ -40,6 +40,9 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
#define USB_VENDOR_ID_ACTIVISION 0x1430
#define USB_DEVICE_ID_ACTIVISION_GUITAR_DONGLE 0x474c
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
...
...
@@ -1083,8 +1086,9 @@
#define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002
#define USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER 0x1000
#define USB_VENDOR_ID_SONY_
GHLIVE
0x12ba
#define USB_VENDOR_ID_SONY_
RHYTHM
0x12ba
#define USB_DEVICE_ID_SONY_PS3WIIU_GHLIVE_DONGLE 0x074b
#define USB_DEVICE_ID_SONY_PS3_GUITAR_DONGLE 0x0100
#define USB_VENDOR_ID_SINO_LITE 0x1345
#define USB_DEVICE_ID_SINO_LITE_CONTROLLER 0x3008
...
...
drivers/hid/hid-sony.c
View file @
c35f31fc
...
...
@@ -12,6 +12,7 @@
* Copyright (c) 2014-2016 Frank Praznik <frank.praznik@gmail.com>
* Copyright (c) 2018 Todd Kelner
* Copyright (c) 2020 Pascal Giard <pascal.giard@etsmtl.ca>
* Copyright (c) 2020 Sanjay Govind <sanjay.govind9@gmail.com>
*/
/*
...
...
@@ -59,7 +60,8 @@
#define NSG_MR5U_REMOTE_BT BIT(14)
#define NSG_MR7U_REMOTE_BT BIT(15)
#define SHANWAN_GAMEPAD BIT(16)
#define GHL_GUITAR_PS3WIIU BIT(17)
#define GH_GUITAR_CONTROLLER BIT(17)
#define GHL_GUITAR_PS3WIIU BIT(18)
#define SIXAXIS_CONTROLLER (SIXAXIS_CONTROLLER_USB | SIXAXIS_CONTROLLER_BT)
#define MOTION_CONTROLLER (MOTION_CONTROLLER_USB | MOTION_CONTROLLER_BT)
...
...
@@ -84,7 +86,7 @@
#define NSG_MRXU_MAX_Y 1868
#define GHL_GUITAR_POKE_INTERVAL 10
/* In seconds */
#define G
HL_G
UITAR_TILT_USAGE 44
#define GUITAR_TILT_USAGE 44
/* Magic value and data taken from GHLtarUtility:
* https://github.com/ghlre/GHLtarUtility/blob/master/PS3Guitar.cs
...
...
@@ -692,7 +694,7 @@ static int guitar_mapping(struct hid_device *hdev, struct hid_input *hi,
if
((
usage
->
hid
&
HID_USAGE_PAGE
)
==
HID_UP_MSVENDOR
)
{
unsigned
int
abs
=
usage
->
hid
&
HID_USAGE
;
if
(
abs
==
G
HL_G
UITAR_TILT_USAGE
)
{
if
(
abs
==
GUITAR_TILT_USAGE
)
{
hid_map_usage_clear
(
hi
,
usage
,
bit
,
max
,
EV_ABS
,
ABS_RY
);
return
1
;
}
...
...
@@ -1481,7 +1483,7 @@ static int sony_mapping(struct hid_device *hdev, struct hid_input *hi,
if
(
sc
->
quirks
&
DUALSHOCK4_CONTROLLER
)
return
ds4_mapping
(
hdev
,
hi
,
field
,
usage
,
bit
,
max
);
if
(
sc
->
quirks
&
GH
L_GUITAR_PS3WIIU
)
if
(
sc
->
quirks
&
GH
_GUITAR_CONTROLLER
)
return
guitar_mapping
(
hdev
,
hi
,
field
,
usage
,
bit
,
max
);
/* Let hid-core decide for the others */
...
...
@@ -3167,8 +3169,14 @@ static const struct hid_device_id sony_devices[] = {
{
HID_BLUETOOTH_DEVICE
(
USB_VENDOR_ID_SMK
,
USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE
),
.
driver_data
=
NSG_MR7U_REMOTE_BT
},
/* Guitar Hero Live PS3 and Wii U guitar dongles */
{
HID_USB_DEVICE
(
USB_VENDOR_ID_SONY_GHLIVE
,
USB_DEVICE_ID_SONY_PS3WIIU_GHLIVE_DONGLE
),
.
driver_data
=
GHL_GUITAR_PS3WIIU
},
{
HID_USB_DEVICE
(
USB_VENDOR_ID_SONY_RHYTHM
,
USB_DEVICE_ID_SONY_PS3WIIU_GHLIVE_DONGLE
),
.
driver_data
=
GHL_GUITAR_PS3WIIU
|
GH_GUITAR_CONTROLLER
},
/* Guitar Hero PC Guitar Dongle */
{
HID_USB_DEVICE
(
USB_VENDOR_ID_ACTIVISION
,
USB_DEVICE_ID_ACTIVISION_GUITAR_DONGLE
),
.
driver_data
=
GH_GUITAR_CONTROLLER
},
/* Guitar Hero PS3 World Tour Guitar Dongle */
{
HID_USB_DEVICE
(
USB_VENDOR_ID_SONY_RHYTHM
,
USB_DEVICE_ID_SONY_PS3_GUITAR_DONGLE
),
.
driver_data
=
GH_GUITAR_CONTROLLER
},
{
}
};
MODULE_DEVICE_TABLE
(
hid
,
sony_devices
);
...
...
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