So there is a kernel driver that has been developed for Nintendo Switch joycons and Nintendo Switch Pro Controller. Here is the built module below. There is an input device that is successful in populating within dolphin-emu - which is awsome.
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-joystick
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-joystick
There is in addition an accelerometer/gyroscope device as well. evtest shows events:
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-if00
evtest /dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-if00
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0x8111
Input device name: "Nintendo Switch Pro Controller IMU"
Supported events:
Event type 0 (EV_SYN)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 599
Min -32767
Max 32767
Fuzz 10
Resolution 4096
Event code 1 (ABS_Y)
Value 1491
Min -32767
Max 32767
Fuzz 10
Resolution 4096
Event code 2 (ABS_Z)
Value 3154
Min -32767
Max 32767
Fuzz 10
Resolution 4096
Event code 3 (ABS_RX)
Value -23
Min -32767
Max 32767
Fuzz 10
Resolution 14
Event code 4 (ABS_RY)
Value 4
Min -32767
Max 32767
Fuzz 10
Resolution 14
Event code 5 (ABS_RZ)
Value 0
Min -32767
Max 32767
Fuzz 10
Resolution 14
Event type 4 (EV_MSC)
Event code 5 (MSC_TIMESTAMP)
Properties:
Property type 6 (INPUT_PROP_ACCELEROMETER)
Testing ... (interrupt to exit)
Event: time 1582031396.661029, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350762296
Event: time 1582031396.661029, type 3 (EV_ABS), code 3 (ABS_RX), value -14
Event: time 1582031396.661029, type 3 (EV_ABS), code 4 (ABS_RY), value 6
Event: time 1582031396.661029, type 3 (EV_ABS), code 5 (ABS_RZ), value -1
Event: time 1582031396.661029, type 3 (EV_ABS), code 1 (ABS_Y), value 1466
Event: time 1582031396.661029, type 3 (EV_ABS), code 2 (ABS_Z), value 3146
Event: time 1582031396.661029, -------------- SYN_REPORT ------------
Event: time 1582031396.661031, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350757296
Event: time 1582031396.661031, type 3 (EV_ABS), code 5 (ABS_RZ), value -2
Event: time 1582031396.661031, type 3 (EV_ABS), code 0 (ABS_X), value 605
Event: time 1582031396.661031, type 3 (EV_ABS), code 1 (ABS_Y), value 1467
Event: time 1582031396.661031, type 3 (EV_ABS), code 2 (ABS_Z), value 3137
Event: time 1582031396.661031, -------------- SYN_REPORT ------------
Event: time 1582031396.661034, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350752296
Event: time 1582031396.661034, type 3 (EV_ABS), code 3 (ABS_RX), value -15
Event: time 1582031396.661034, type 3 (EV_ABS), code 4 (ABS_RY), value 4
Event: time 1582031396.661034, type 3 (EV_ABS), code 5 (ABS_RZ), value -3
Event: time 1582031396.661034, type 3 (EV_ABS), code 0 (ABS_X), value 611
Event: time 1582031396.661034, type 3 (EV_ABS), code 1 (ABS_Y), value 1469
Event: time 1582031396.661034, type 3 (EV_ABS), code 2 (ABS_Z), value 3130
Event: time 1582031396.661034, -------------- SYN_REPORT ------------
Event: time 1582031396.677031, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350747296
Event: time 1582031396.677031, type 3 (EV_ABS), code 3 (ABS_RX), value -9
Event: time 1582031396.677031, type 3 (EV_ABS), code 4 (ABS_RY), value 6
... Continued data stream
Driver via modinfo hid_nintendo:
filename: /lib/modules/5.5.4-arch1-3-custom/kernel/drivers/hid/hid-nintendo.ko.xz
description: Driver for Nintendo Switch Controllers
author: Daniel J. Ogorchock <djogorchock@gmail.com>
license: GPL
srcversion: 053B2F951FC297C89D32683
alias: hid:b0005g*v0000057Ep00002007
alias: hid:b0005g*v0000057Ep00002006
alias: hid:b0003g*v0000057Ep0000200E
alias: hid:b0005g*v0000057Ep00002009
alias: hid:b0003g*v0000057Ep00002009
depends: hid,ff-memless
retpoline: Y
intree: Y
name: hid_nintendo
vermagic: 5.5.4-arch1-3-custom SMP preempt mod_unload
sig_id: PKCS#7
signer: Build time autogenerated kernel key
So the issue I am having is attempting to custom configure the IMU device listed above as a gyro/accell input device. Don't know if this can be squashed or not as i'm not familiar with dolphin dev branches.
Just a thought as this appears like it will be the linux kernel driver for Nintendo Switch Pro controllers and Nintendo Switch Joycon controllers located here: https://patchwork.kernel.org/patch/11312567/
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-joystick
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-joystick
There is in addition an accelerometer/gyroscope device as well. evtest shows events:
/dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-if00
evtest /dev/input/by-id/usb-Nintendo_Co.__Ltd._Pro_Controller_000000000001-event-if00
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0x8111
Input device name: "Nintendo Switch Pro Controller IMU"
Supported events:
Event type 0 (EV_SYN)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 599
Min -32767
Max 32767
Fuzz 10
Resolution 4096
Event code 1 (ABS_Y)
Value 1491
Min -32767
Max 32767
Fuzz 10
Resolution 4096
Event code 2 (ABS_Z)
Value 3154
Min -32767
Max 32767
Fuzz 10
Resolution 4096
Event code 3 (ABS_RX)
Value -23
Min -32767
Max 32767
Fuzz 10
Resolution 14
Event code 4 (ABS_RY)
Value 4
Min -32767
Max 32767
Fuzz 10
Resolution 14
Event code 5 (ABS_RZ)
Value 0
Min -32767
Max 32767
Fuzz 10
Resolution 14
Event type 4 (EV_MSC)
Event code 5 (MSC_TIMESTAMP)
Properties:
Property type 6 (INPUT_PROP_ACCELEROMETER)
Testing ... (interrupt to exit)
Event: time 1582031396.661029, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350762296
Event: time 1582031396.661029, type 3 (EV_ABS), code 3 (ABS_RX), value -14
Event: time 1582031396.661029, type 3 (EV_ABS), code 4 (ABS_RY), value 6
Event: time 1582031396.661029, type 3 (EV_ABS), code 5 (ABS_RZ), value -1
Event: time 1582031396.661029, type 3 (EV_ABS), code 1 (ABS_Y), value 1466
Event: time 1582031396.661029, type 3 (EV_ABS), code 2 (ABS_Z), value 3146
Event: time 1582031396.661029, -------------- SYN_REPORT ------------
Event: time 1582031396.661031, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350757296
Event: time 1582031396.661031, type 3 (EV_ABS), code 5 (ABS_RZ), value -2
Event: time 1582031396.661031, type 3 (EV_ABS), code 0 (ABS_X), value 605
Event: time 1582031396.661031, type 3 (EV_ABS), code 1 (ABS_Y), value 1467
Event: time 1582031396.661031, type 3 (EV_ABS), code 2 (ABS_Z), value 3137
Event: time 1582031396.661031, -------------- SYN_REPORT ------------
Event: time 1582031396.661034, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350752296
Event: time 1582031396.661034, type 3 (EV_ABS), code 3 (ABS_RX), value -15
Event: time 1582031396.661034, type 3 (EV_ABS), code 4 (ABS_RY), value 4
Event: time 1582031396.661034, type 3 (EV_ABS), code 5 (ABS_RZ), value -3
Event: time 1582031396.661034, type 3 (EV_ABS), code 0 (ABS_X), value 611
Event: time 1582031396.661034, type 3 (EV_ABS), code 1 (ABS_Y), value 1469
Event: time 1582031396.661034, type 3 (EV_ABS), code 2 (ABS_Z), value 3130
Event: time 1582031396.661034, -------------- SYN_REPORT ------------
Event: time 1582031396.677031, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value -1350747296
Event: time 1582031396.677031, type 3 (EV_ABS), code 3 (ABS_RX), value -9
Event: time 1582031396.677031, type 3 (EV_ABS), code 4 (ABS_RY), value 6
... Continued data stream
Driver via modinfo hid_nintendo:
filename: /lib/modules/5.5.4-arch1-3-custom/kernel/drivers/hid/hid-nintendo.ko.xz
description: Driver for Nintendo Switch Controllers
author: Daniel J. Ogorchock <djogorchock@gmail.com>
license: GPL
srcversion: 053B2F951FC297C89D32683
alias: hid:b0005g*v0000057Ep00002007
alias: hid:b0005g*v0000057Ep00002006
alias: hid:b0003g*v0000057Ep0000200E
alias: hid:b0005g*v0000057Ep00002009
alias: hid:b0003g*v0000057Ep00002009
depends: hid,ff-memless
retpoline: Y
intree: Y
name: hid_nintendo
vermagic: 5.5.4-arch1-3-custom SMP preempt mod_unload
sig_id: PKCS#7
signer: Build time autogenerated kernel key
So the issue I am having is attempting to custom configure the IMU device listed above as a gyro/accell input device. Don't know if this can be squashed or not as i'm not familiar with dolphin dev branches.
Just a thought as this appears like it will be the linux kernel driver for Nintendo Switch Pro controllers and Nintendo Switch Joycon controllers located here: https://patchwork.kernel.org/patch/11312567/