patches for Innomedia INNEX GENESIS/ATARI adapter
PATCH 2/2 HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter
In reply to Tomasz KramkowskiThe (1292:4745) Innomedia INNEX GENESIS/ATARI adapter needs HID_QUIRK_MULTI_INPUT to split the device up into two controllers instead of inputs from both being merged into one.
This patch depends on patch 1.
--- drivers/hid/usbhid/hid-quirks.c | 1 + 1 file changed, 1 insertion(+)
drivers/hid/usbhid/hid-quirks.c +1 -0
@@ -165,6 +165,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI, HID_QUIRK_MULTI_INPUT }, { 0, 0 } };
Signature · 1 line
2.10.2
cover patches for Innomedia INNEX GENESIS/ATARI adapter
This is a couple of patches which fix issues with the (1292:4745) Innomedia INNEX GENESIS/ATARI controller USB adapter. I've personally tested these patches against the master of the hid tree.
Patch 2 depends on patch 1.
I wasn't sure if adding a new config symbol meant I needed to add it to some default config so I left that alone.
Hopefully I didn't screw anything up.
Thanks,
Signature · 17 lines
Tomasz Kramkowski Tomasz Kramkowski (2): HID: add Innomedia INNEX GENESIS/ATARI adapter support HID: usbhid: add quirk for Innomedia INNEX GENESIS/ATARI adapter drivers/hid/Kconfig | 6 ++++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 ++ drivers/hid/hid-innomedia.c | 63 +++++++++++++++++++++++++++++++++++++++++ drivers/hid/usbhid/hid-quirks.c | 1 + 6 files changed, 75 insertions(+) create mode 100644 drivers/hid/hid-innomedia.c -- 2.10.2
PATCH 1/2 HID: add innomedia INNEX GENESIS/ATARI adapter support
Add a new module named hid-innomedia which implements support for the (1292:4745) innomedia INNEX GENESIS/ATARI Controller USB adapter.
This device mis-reports the X and Y axis on the DPad when up or left are pressed. The value reported is outside the range reported by the report descriptor. The device reports -2 for left or up, 1 for right or down, 0 for nothing pressed and -1 for up and down or left and right pressed simultaneously. This means that when left or up are pressed, the value gets dropped by hid-input. Additionally, when both up and down or left and right are pressed the device incorrectly reports up or left respectively.
--- drivers/hid/Kconfig | 6 +++++ drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-innomedia.c | 63 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 74 insertions(+) create mode 100644 drivers/hid/hid-innomedia.c
drivers/hid/Kconfig +6 -0
@@ -369,6 +369,12 @@ config HID_ICADE To compile this driver as a module, choose M here: the module will be called hid-icade. +config HID_INNOMEDIA + tristate "Innomedia GENESIS/ATARI Controller USB adapter" + depends on HID + ---help--- + Support for the Innomedia GENESIS/ATARI Controller USB adapter. + config HID_TWINHAN tristate "Twinhan IR remote control" depends on HID
drivers/hid/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_HID_HOLTEK) += hid-holtek-mouse.o obj-$(CONFIG_HID_HOLTEK) += hid-holtekff.o obj-$(CONFIG_HID_HYPERV_MOUSE) += hid-hyperv.o obj-$(CONFIG_HID_ICADE) += hid-icade.o +obj-$(CONFIG_HID_INNOMEDIA) += hid-innomedia.o obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o obj-$(CONFIG_HID_KEYTOUCH) += hid-keytouch.o obj-$(CONFIG_HID_KYE) += hid-kye.o
drivers/hid/hid-core.c +1 -0
@@ -1912,6 +1912,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) }, { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) }, + { HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI) }, { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
drivers/hid/hid-ids.h +3 -0
@@ -537,6 +537,9 @@#define USB_VENDOR_ID_IRTOUCHSYSTEMS 0x6615#define USB_DEVICE_ID_IRTOUCH_INFRARED_USB 0x0070 +#define USB_VENDOR_ID_INNOMEDIA 0x1292 +#define USB_DEVICE_ID_INNEX_GENESIS_ATARI 0x4745 +#define USB_VENDOR_ID_ITE 0x048d#define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386#define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350
drivers/hid/hid-innomedia.c new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
2.10.2
Jiri Kosina
maintainerQuoted 10 lines · Tomasz Kramkowski
This is a couple of patches which fix issues with the (1292:4745) Innomedia INNEX GENESIS/ATARI controller USB adapter. I've personally tested these patches against the master of the hid tree.
Patch 2 depends on patch 1.
I wasn't sure if adding a new config symbol meant I needed to add it to some default config so I left that alone.
Hopefully I didn't screw anything up.
All looks good, except I'd probably squash both the patches into one 'add adapter support', as I don't really see a value with separating this into two patches. If you agree, I can do that myself and apply.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Whoops, forgot to reply all...
Quoted 10 lines · Jiri Kosina
All looks good, except I'd probably squash both the patches into one 'add adapter support', as I don't really see a value with separating this into two patches. If you agree, I can do that myself and apply.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
It's perfectly fine if you squash them, I was erring on the side of caution, I would rather send two patches and have them squash than to have to resend after splitting.
Thanks,
Signature · 1 line
Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/
Jiri Kosina
maintainerQuoted 6 lines · Jiri Kosina
Quoted 6 lines
This is a couple of patches which fix issues with the (1292:4745) Innomedia INNEX GENESIS/ATARI controller USB adapter. I've personally tested these patches against the master of the hid tree.
Patch 2 depends on patch 1.
Quoted 8 lines
Quoted 4 lines
I wasn't sure if adding a new config symbol meant I needed to add it to some default config so I left that alone.
Hopefully I didn't screw anything up.
All looks good, except I'd probably squash both the patches into one 'add adapter support', as I don't really see a value with separating this into two patches. If you agree, I can do that myself and apply.
We've discussed with Tomasz off-list, and it looks like that there likely is a better and more general way to fix it; this seems to have actually been caused by 6da7066906e977d4 ("HID: ignore absolute values which don't fit between logical min and max"), as it turns out that this check should be applied only in case Null state is set (refer to HID specification 1.11, section 6.2.2.5, p.31), bko#68621.
Tomasz comitted to look into this after coming back from christmas/new year vacation. I'm putting the innomedia branch on hold for now.
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 7 lines · Jiri Kosina
We've discussed with Tomasz off-list, and it looks like that there likely is a better and more general way to fix it; this seems to have actually been caused by
6da7066906e977d4("HID: ignore absolute values which don't fit between logical min and max"), as it turns out that this check should be applied only in case Null state is set (refer to HID specification 1.11, section 6.2.2.5, p.31), bko#68621.
Quoted 6 lines
Tomasz comitted to look into this after coming back from christmas/new year vacation. I'm putting the innomedia branch on hold for now.
Signature · 2 lines
Jiri Kosina SUSE Labs
I've tested the patch from the bugzilla and it does indeed prevent the values being discarded. evtest reports the minimum and maximums correctly as -1 and 1 but the events give values -2 and 1, I'm not sure if this will be an issue as jstest correctly sees left/up presses as -32767 and right/down presses as 32767. The device still needs the HID_QUIRK_MULTI_INPUT quirk to correctly show up as two event/js devices.
I will still need to do a few more tests to make sure there are no issues in other applications and to make sure that other devices still operate correctly too.
Once that is done I will go ahead and send two patches, one with the authorship preserved for the bugzilla patch and one patch to add the quirks.
Signature · 1 line
Tomasz Kramkowski | GPG: 40B037BA0A5B8680 | Web: https://the-tk.com/