Skip to contentSkip to conversation

HID: sony: backport DualShock 4 device ids

PATCH In review Roderick Colenbrander 3 participants 5 messages Sep 27, 2018 Stable branch

lore
Share & tools
lore
#0 lore raw

cover HID: sony: backport DualShock 4 device ids

Hi,

We would like to request inclusion of updated DualShock 4 device ids for hid-sony in Linux 3.18. Existing devices on older kernels already support the original DualShock 4, but not recent hardware revisions. A similar backport was submitted for 4.4/4.9. Kernels newer than 4.12 already include these patches.

The patches were cherry-picked from upstream and modified to apply cleanly and compile.

Thanks,
Roderick Colenbrander

Roderick Colenbrander (2):
HID: sony: Update device ids
HID: sony: Support DS4 dongle

 drivers/hid/hid-core.c | 3 +++
 drivers/hid/hid-ids.h  | 2 ++
 drivers/hid/hid-sony.c | 6 ++++++
 3 files changed, 11 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 HID: sony: Update device ids

From: Roderick Colenbrander <[email protected]>

commit cf1015d65d7c8a5504a4c03afb60fb86bff0f032 upstream.

Support additional DS4 model.

---
 drivers/hid/hid-core.c | 2 ++
 drivers/hid/hid-ids.h  | 1 +
 drivers/hid/hid-sony.c | 4 ++++
 3 files changed, 7 insertions(+)
drivers/hid/hid-core.c +2 -0
index 39debe2f0c35..dd7b7de789ce 100644
@@ -1935,6 +1935,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) },
drivers/hid/hid-ids.h +1 -0
index 334390bae33d..c1c967cb9aa6 100644
@@ -846,6 +846,7 @@
 #define USB_DEVICE_ID_SONY_PS3_BDREMOTE		0x0306
 #define USB_DEVICE_ID_SONY_PS3_CONTROLLER	0x0268
 #define USB_DEVICE_ID_SONY_PS4_CONTROLLER	0x05c4
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2	0x09cc
 #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER	0x042f
 #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER		0x0002
 #define USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER	0x1000
drivers/hid/hid-sony.c +4 -0
index 15b3475e641d..62642f121697 100644
@@ -2042,6 +2042,10 @@ static const struct hid_device_id sony_devices[] = {
 		.driver_data = DUALSHOCK4_CONTROLLER_USB },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
 		.driver_data = DUALSHOCK4_CONTROLLER_BT },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
+		.driver_data = DUALSHOCK4_CONTROLLER_USB },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
+		.driver_data = DUALSHOCK4_CONTROLLER_BT },
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, sony_devices);
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 HID: sony: Support DS4 dongle

In reply to Roderick Colenbrander

From: Roderick Colenbrander <[email protected]>

commit de66a1a04c25f2560a8dca7a95e2a150b0d5e17e upstream.

Add support for USB based DS4 dongle device, which allows connecting a DS4 through Bluetooth, but hides Bluetooth from the host system.

---
 drivers/hid/hid-core.c | 1 +
 drivers/hid/hid-ids.h  | 1 +
 drivers/hid/hid-sony.c | 2 ++
 3 files changed, 4 insertions(+)
drivers/hid/hid-core.c +1 -0
index dd7b7de789ce..ae88185d5d30 100644
@@ -1937,6 +1937,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) },
drivers/hid/hid-ids.h +1 -0
index c1c967cb9aa6..cf3d4944fc12 100644
@@ -847,6 +847,7 @@
 #define USB_DEVICE_ID_SONY_PS3_CONTROLLER	0x0268
 #define USB_DEVICE_ID_SONY_PS4_CONTROLLER	0x05c4
 #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2	0x09cc
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE	0x0ba0
 #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER	0x042f
 #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER		0x0002
 #define USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER	0x1000
drivers/hid/hid-sony.c +2 -0
index 62642f121697..3998e69d132d 100644
@@ -2046,6 +2046,8 @@ static const struct hid_device_id sony_devices[] = {
 		.driver_data = DUALSHOCK4_CONTROLLER_USB },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
 		.driver_data = DUALSHOCK4_CONTROLLER_BT },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
+		.driver_data = DUALSHOCK4_CONTROLLER_USB },
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, sony_devices);
Signature · 1 line
2.17.1
#3 lore raw
In reply to Roderick Colenbrander
Quoted 6 lines · Roderick Colenbrander

Hi,

We would like to request inclusion of updated DualShock 4 device ids for hid-sony in Linux 3.18. Existing devices on older kernels already support the original DualShock 4, but not recent hardware revisions. A similar backport was submitted for 4.4/4.9. Kernels newer than 4.12 already include these patches.

I hope no one is still using 3.18 for new hardware, but as you sent me the patches, I'll go queue them up :)

thanks,

greg k-h

#4 lore raw
Quoted 8 lines · Greg KH
Quoted 6 lines · Roderick Colenbrander

Hi,

We would like to request inclusion of updated DualShock 4 device ids for hid-sony in Linux 3.18. Existing devices on older kernels already support the original DualShock 4, but not recent hardware revisions. A similar backport was submitted for 4.4/4.9. Kernels newer than 4.12 already include these patches.

Quoted 7 lines

I hope no one is still using 3.18 for new hardware, but as you sent me the patches, I'll go queue them up :)

thanks,

greg k-h

Thanks for applying. There is just this small company in Mountain View, who asked for this backport and likes to use older kernels.... If only they upgraded devices to more recent kernels... :)

Thanks,
Roderick