Skip to contentSkip to conversation

HID: wiimote: add LEGO-wiimote VID

PATCH Applied David Herrmann 2 participants 2 messages Oct 18, 2013 – Oct 21, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: wiimote: add LEGO-wiimote VID

The LEGO-wiimote uses a different VID than the Nintendo ID. The device is technically the same so add the ID.

---
 drivers/hid/hid-core.c         | 1 +
 drivers/hid/hid-ids.h          | 1 +
 drivers/hid/hid-wiimote-core.c | 5 ++++-
 3 files changed, 6 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +1 -0
index 95d2dff..e6c3a03 100644
@@ -1871,6 +1871,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) },
 	{ }
 };
drivers/hid/hid-ids.h +1 -0
index ac803c5..000e0df 100644
@@ -639,6 +639,7 @@
 #define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN	0x0003
 
 #define USB_VENDOR_ID_NINTENDO		0x057e
+#define USB_VENDOR_ID_NINTENDO2		0x054c
 #define USB_DEVICE_ID_NINTENDO_WIIMOTE	0x0306
 #define USB_DEVICE_ID_NINTENDO_WIIMOTE2	0x0330
 
drivers/hid/hid-wiimote-core.c +4 -1
index abb20db..1446f52 100644
@@ -834,7 +834,8 @@ static void wiimote_init_set_type(struct wiimote_data *wdata,
 		goto done;
 	}
 
-	if (vendor == USB_VENDOR_ID_NINTENDO) {
+	if (vendor == USB_VENDOR_ID_NINTENDO ||
+	    vendor == USB_VENDOR_ID_NINTENDO2) {
 		if (product == USB_DEVICE_ID_NINTENDO_WIIMOTE) {
 			devtype = WIIMOTE_DEV_GEN10;
 			goto done;
@@ -1855,6 +1856,8 @@ static void wiimote_hid_remove(struct hid_device *hdev)
 static const struct hid_device_id wiimote_hid_devices[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
 				USB_DEVICE_ID_NINTENDO_WIIMOTE) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2,
+				USB_DEVICE_ID_NINTENDO_WIIMOTE) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
 				USB_DEVICE_ID_NINTENDO_WIIMOTE2) },
 	{ }
Signature · 1 line
1.8.4
Applied
#1 lore raw
Quoted 2 lines · David Herrmann

The LEGO-wiimote uses a different VID than the Nintendo ID. The device is technically the same so add the ID.

Applied, thanks David.

Signature · 2 lines
Jiri Kosina
SUSE Labs