HID: mf: add support for Legion Go dual dinput modes
PATCH 1/1 HID: mf: add support for Legion Go dual dinput modes
The Legion Go features detachable controllers which support a dual dinput mode. In this mode, the controllers appear under a single HID device with two applications.
Currently, both controllers appear under the same event device, causing their controls to be mixed up. This patch separates the two so that they can be used independently.
In addition, the latest firmware update for the Legion Go swaps the IDs to the ones used by the Legion Go 2, so add those IDs as well.
--- drivers/hid/hid-ids.h | 2 ++ drivers/hid/hid-quirks.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +2 -0
@@ -834,6 +834,8 @@#define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019 0x6019#define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_602E 0x602e#define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6093 0x6093 +#define USB_DEVICE_ID_LENOVO_LEGION_GO_DUAL_DINPUT 0x6184 +#define USB_DEVICE_ID_LENOVO_LEGION_GO2_DUAL_DINPUT 0x61ed#define USB_VENDOR_ID_LETSKETCH 0x6161#define USB_DEVICE_ID_WP9620N 0x4d15
drivers/hid/hid-quirks.c +2 -0
@@ -124,6 +124,8 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_T609A), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_ODDOR_HANDBRAKE), HID_QUIRK_ALWAYS_POLL }, + { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_LEGION_GO_DUAL_DINPUT), HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_LEGION_GO2_DUAL_DINPUT), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019), HID_QUIRK_ALWAYS_POLL },
base-commit: 186f3edfdd41f2ae87fc40a9ccba52a3bf930994
Signature · 1 line
2.50.1
Jiri Kosina
maintainerQuoted 4 lines · Antheas Kapenekakis
The Legion Go features detachable controllers which support a dual dinput mode. In this mode, the controllers appear under a single HID device with two applications.
Quoted 8 lines
Currently, both controllers appear under the same event device, causing their controls to be mixed up. This patch separates the two so that they can be used independently.
In addition, the latest firmware update for the Legion Go swaps the IDs to the ones used by the Legion Go 2, so add those IDs as well.
Signed-off-by Antheas Kapenekakis <[email protected]>
Hi,
thanks, the patch looks good, but what is the 'mf: ' prefix about in the subject/shortlog?
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 14 lines · Jiri Kosina
Quoted 11 lines · Antheas Kapenekakis
The Legion Go features detachable controllers which support a dual dinput mode. In this mode, the controllers appear under a single HID device with two applications.
Currently, both controllers appear under the same event device, causing their controls to be mixed up. This patch separates the two so that they can be used independently.
In addition, the latest firmware update for the Legion Go swaps the IDs to the ones used by the Legion Go 2, so add those IDs as well.
Quoted 6 lines
Quoted 1 line
Signed-off-by Antheas Kapenekakis <[email protected]>Hi,
thanks, the patch looks good, but what is the 'mf: ' prefix about in the subject/shortlog?
Hm, I referenced a previous commit while writing the header and it might not be relevant. Can you replace mf with quirks when merging if it is more appropriate?
Thank you,
Antheas
Quoted 5 lines
--
Jiri Kosina
SUSE Labs
Jiri Kosina
maintainerQuoted 1 line · Antheas Kapenekakis
Can you replace mf with quirks when merging if it is more appropriate?
Done. Now in hid.git#for-6.17/upstream-fixes. Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs