Message ID | fbjhelddqwf6yenezqqndihm7sebehpg4cubdwktxyw2nnirrs@2yz7fahu6nr6 (mailing list archive) |
---|---|
State | New |
Delegated to: | Jiri Kosina |
Headers | show |
Series | [RFC/HELP] add support for POWER-A/THQ BDA NSW Nintendo Controller | expand |
Hi Ethan Ethan Carter Edwards <ethan@ethancedwards.com> wrote: > Hello all, > > I have an unofficial USB Nintendo Switch Pro controller that I have had > for a few years and want to try to use on Linux. For reference, the > vendor id and device ids are as follows: > > Vendor: 20d6 > Device: 0002 > > I tried adding the device to the hid-nintendo module to add support but > that did not work (see below for code). I recieved a few errors from dmesg > > nintendo 0003:20D6:0002.0011: Failed to get joycon info; ret=-110 > nintendo 0003:20D6:0002.0011: Failed to retrieve controller info; ret=-110 > nintendo 0003:20D6:0002.0011: Failed to initialize controller; ret=-110 > nintendo 0003:20D6:0002.0011: probe - fail = -110 > nintendo 0003:20D6:0002.0011: probe with driver nintendo failed with error -110 > > I understand that -110 is a timeout. But I don't understand much else. I have tried to write a test for the Nintendo HID driver for a while and think I have encountered this error as well. If I remember correctly, this timeout happens because the controller does not respond with the reply that the driver is expecting (or at least not in time). > And I am not sure where to go from here. Any suggestions? I'm a newbie as well but my understanding is that you would have to figure out what the controller is actually sending back and how it differs from what the driver expects. Then you might be able to either adapt the driver accordingly (if the behaviour of the device is similar enough to the official pro controller) or write a separate driver that can handle this controller ... Cheers, Silvan
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index c448de53bf91..693e6f584c8a 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1289,6 +1289,7 @@ #define USB_DEVICE_ID_BLINK1 0x01ed #define USB_VENDOR_ID_THQ 0x20d6 +#define USB_DEVICE_ID_THQ_BDA_NSW 0x0002 #define USB_DEVICE_ID_THQ_PS3_UDRAW 0xcb17 #define USB_VENDOR_ID_THRUSTMASTER 0x044f diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index 11ac246176ae..54f1b49849c0 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -2783,6 +2783,8 @@ static const struct hid_device_id nintendo_hid_devices[] = { USB_DEVICE_ID_NINTENDO_GENCON) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_N64CON) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THQ, + USB_DEVICE_ID_THQ_BDA_NSW) }, { } }; MODULE_DEVICE_TABLE(hid, nintendo_hid_devices);