* [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade @ 2015-10-24 15:44 Michele Baldessari 2015-10-24 20:11 ` Jiri Kosina 2015-10-25 9:15 ` Lars Melin 0 siblings, 2 replies; 8+ messages in thread From: Michele Baldessari @ 2015-10-24 15:44 UTC (permalink / raw) To: Jiri Kosina; +Cc: Michele Baldessari, linux-usb, linux-input, linux-kernel The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order to have the two distinct joysticks working. Before the change: $ jstest /dev/input/js0 Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) ... $ jstest /dev/input/js1 jstest: No such file or directory After the change: $ jstest /dev/input/js0 Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) ... $ jstest /dev/input/js1 Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) ... Signed-off-by: Michele Baldessari <michele@acksyn.org> --- drivers/hid/usbhid/hid-quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 1dff8f0015ba..f69049314a2c 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -150,6 +150,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_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { 0, 0 } }; -- 2.5.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade 2015-10-24 15:44 [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade Michele Baldessari @ 2015-10-24 20:11 ` Jiri Kosina [not found] ` <alpine.LNX.2.00.1510242210360.21100-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org> 2015-10-25 9:15 ` Lars Melin 1 sibling, 1 reply; 8+ messages in thread From: Jiri Kosina @ 2015-10-24 20:11 UTC (permalink / raw) To: Michele Baldessari; +Cc: linux-usb, linux-input, linux-kernel, Olivier Scherler On Sat, 24 Oct 2015, Michele Baldessari wrote: > The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order > to have the two distinct joysticks working. > > Before the change: > $ jstest /dev/input/js0 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > ... > $ jstest /dev/input/js1 > jstest: No such file or directory > > After the change: > $ jstest /dev/input/js0 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > ... > $ jstest /dev/input/js1 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > ... > > Signed-off-by: Michele Baldessari <michele@acksyn.org> Adding Oliver to CC. Oliver, how come that you didn't need this while working on the inigial Xin-Mo Dual Arcade support? Thanks. > --- > drivers/hid/usbhid/hid-quirks.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c > index 1dff8f0015ba..f69049314a2c 100644 > --- a/drivers/hid/usbhid/hid-quirks.c > +++ b/drivers/hid/usbhid/hid-quirks.c > @@ -150,6 +150,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_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, > > { 0, 0 } > }; > -- > 2.5.0 > -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <alpine.LNX.2.00.1510242210360.21100-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>]
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade 2015-10-24 20:11 ` Jiri Kosina @ 2015-10-26 11:00 ` Olivier Scherler 0 siblings, 0 replies; 8+ messages in thread From: Olivier Scherler @ 2015-10-26 11:00 UTC (permalink / raw) To: Jiri Kosina Cc: Michele Baldessari, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-input-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA Hi, > On 24 oct. 2015, at 22:11, Jiri Kosina <jikos-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: > > On Sat, 24 Oct 2015, Michele Baldessari wrote: > >> The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order >> to have the two distinct joysticks working. >> >> Before the change: >> $ jstest /dev/input/js0 >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) >> ... >> $ jstest /dev/input/js1 >> jstest: No such file or directory >> >> After the change: >> $ jstest /dev/input/js0 >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) >> ... >> $ jstest /dev/input/js1 >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) >> ... >> >> Signed-off-by: Michele Baldessari <michele-Vrs1pLNSz9odnm+yROfE0A@public.gmane.org> > > Adding Oliver to CC. > > Oliver, how come that you didn't need this while working on the inigial > Xin-Mo Dual Arcade support? Because I didn’t mind whether the controller announced itself as two joysticks with two axes each, or one joystick with four axes. In the software I use it for (a MAME for the Raspberry Pi), I can map a single device’s buttons and axes to several players. I’m a bit surprised with this, though: > $ jstest /dev/input/js0 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) because in my case I had four axes, at least using evtest (I don’t remember if I tried jstest as well). What bothered me at the time, though, is that even though the custom driver was made as a kernel module, an entry had to be added in the hid_have_special_driver table in hid-core.c for the kernel to use it, which means, if I understand properly, that the kernel still needs recompiling. Is that normal? Best regards, Olivier -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade @ 2015-10-26 11:00 ` Olivier Scherler 0 siblings, 0 replies; 8+ messages in thread From: Olivier Scherler @ 2015-10-26 11:00 UTC (permalink / raw) To: Jiri Kosina; +Cc: Michele Baldessari, linux-usb, linux-input, linux-kernel Hi, > On 24 oct. 2015, at 22:11, Jiri Kosina <jikos@kernel.org> wrote: > > On Sat, 24 Oct 2015, Michele Baldessari wrote: > >> The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order >> to have the two distinct joysticks working. >> >> Before the change: >> $ jstest /dev/input/js0 >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) >> ... >> $ jstest /dev/input/js1 >> jstest: No such file or directory >> >> After the change: >> $ jstest /dev/input/js0 >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) >> ... >> $ jstest /dev/input/js1 >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) >> ... >> >> Signed-off-by: Michele Baldessari <michele@acksyn.org> > > Adding Oliver to CC. > > Oliver, how come that you didn't need this while working on the inigial > Xin-Mo Dual Arcade support? Because I didn’t mind whether the controller announced itself as two joysticks with two axes each, or one joystick with four axes. In the software I use it for (a MAME for the Raspberry Pi), I can map a single device’s buttons and axes to several players. I’m a bit surprised with this, though: > $ jstest /dev/input/js0 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) because in my case I had four axes, at least using evtest (I don’t remember if I tried jstest as well). What bothered me at the time, though, is that even though the custom driver was made as a kernel module, an entry had to be added in the hid_have_special_driver table in hid-core.c for the kernel to use it, which means, if I understand properly, that the kernel still needs recompiling. Is that normal? Best regards, Olivier ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade 2015-10-26 11:00 ` Olivier Scherler @ 2015-10-26 12:06 ` Michele Baldessari -1 siblings, 0 replies; 8+ messages in thread From: Michele Baldessari @ 2015-10-26 12:06 UTC (permalink / raw) To: Olivier Scherler; +Cc: Jiri Kosina, linux-usb, linux-input, linux-kernel Hi Olivier, On Mon, Oct 26, 2015 at 12:00:50PM +0100, Olivier Scherler wrote: > > On 24 oct. 2015, at 22:11, Jiri Kosina <jikos@kernel.org> wrote: > > On Sat, 24 Oct 2015, Michele Baldessari wrote: > > > >> The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order > >> to have the two distinct joysticks working. > >> > >> Before the change: > >> $ jstest /dev/input/js0 > >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >> ... > >> $ jstest /dev/input/js1 > >> jstest: No such file or directory > >> > >> After the change: > >> $ jstest /dev/input/js0 > >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >> ... > >> $ jstest /dev/input/js1 > >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >> ... > >> > >> Signed-off-by: Michele Baldessari <michele@acksyn.org> > > > > Adding Oliver to CC. > > > > Oliver, how come that you didn't need this while working on the inigial > > Xin-Mo Dual Arcade support? > > Because I didn’t mind whether the controller announced itself as two > joysticks with two axes each, or one joystick with four axes. In the > software I use it for (a MAME for the Raspberry Pi), I can map a > single device’s buttons and axes to several players. > > I’m a bit surprised with this, though: > > > $ jstest /dev/input/js0 > > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > > because in my case I had four axes, at least using evtest (I don’t > remember if I tried jstest as well). Ah that is the crux of the matter. It never showed up with four axes in my tests (raspbian, kernel 4.1.7), hence I submitted the patch given that the two joysticks were indistinguishable without it on my setup. Which kernel version did you run your tests on? (Maybe some other change skewed things around?) > What bothered me at the time, though, is that even though the custom > driver was made as a kernel module, an entry had to be added in the > hid_have_special_driver table in hid-core.c for the kernel to use it, > which means, if I understand properly, that the kernel still needs > recompiling. Is that normal? I had that line in my kernel prior to my patch: https://github.com/raspberrypi/linux/blob/rpi-4.1.y/drivers/hid/hid-core.c#L2008 Kind regards, Michele -- Michele Baldessari <michele@acksyn.org> C2A5 9DA3 9961 4FFB E01B D0BC DDD4 DCCB 7515 5C6D -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade @ 2015-10-26 12:06 ` Michele Baldessari 0 siblings, 0 replies; 8+ messages in thread From: Michele Baldessari @ 2015-10-26 12:06 UTC (permalink / raw) To: Olivier Scherler; +Cc: Jiri Kosina, linux-usb, linux-input, linux-kernel Hi Olivier, On Mon, Oct 26, 2015 at 12:00:50PM +0100, Olivier Scherler wrote: > > On 24 oct. 2015, at 22:11, Jiri Kosina <jikos@kernel.org> wrote: > > On Sat, 24 Oct 2015, Michele Baldessari wrote: > > > >> The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order > >> to have the two distinct joysticks working. > >> > >> Before the change: > >> $ jstest /dev/input/js0 > >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >> ... > >> $ jstest /dev/input/js1 > >> jstest: No such file or directory > >> > >> After the change: > >> $ jstest /dev/input/js0 > >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >> ... > >> $ jstest /dev/input/js1 > >> Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >> ... > >> > >> Signed-off-by: Michele Baldessari <michele@acksyn.org> > > > > Adding Oliver to CC. > > > > Oliver, how come that you didn't need this while working on the inigial > > Xin-Mo Dual Arcade support? > > Because I didn’t mind whether the controller announced itself as two > joysticks with two axes each, or one joystick with four axes. In the > software I use it for (a MAME for the Raspberry Pi), I can map a > single device’s buttons and axes to several players. > > I’m a bit surprised with this, though: > > > $ jstest /dev/input/js0 > > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > > because in my case I had four axes, at least using evtest (I don’t > remember if I tried jstest as well). Ah that is the crux of the matter. It never showed up with four axes in my tests (raspbian, kernel 4.1.7), hence I submitted the patch given that the two joysticks were indistinguishable without it on my setup. Which kernel version did you run your tests on? (Maybe some other change skewed things around?) > What bothered me at the time, though, is that even though the custom > driver was made as a kernel module, an entry had to be added in the > hid_have_special_driver table in hid-core.c for the kernel to use it, > which means, if I understand properly, that the kernel still needs > recompiling. Is that normal? I had that line in my kernel prior to my patch: https://github.com/raspberrypi/linux/blob/rpi-4.1.y/drivers/hid/hid-core.c#L2008 Kind regards, Michele -- Michele Baldessari <michele@acksyn.org> C2A5 9DA3 9961 4FFB E01B D0BC DDD4 DCCB 7515 5C6D ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade 2015-10-24 15:44 [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade Michele Baldessari 2015-10-24 20:11 ` Jiri Kosina @ 2015-10-25 9:15 ` Lars Melin 2015-10-25 16:34 ` Michele Baldessari 1 sibling, 1 reply; 8+ messages in thread From: Lars Melin @ 2015-10-25 9:15 UTC (permalink / raw) To: Michele Baldessari, Jiri Kosina; +Cc: linux-usb, linux-input, linux-kernel On 2015-10-24 22:44, Michele Baldessari wrote: > The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order > to have the two distinct joysticks working. > > Before the change: > $ jstest /dev/input/js0 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > ... > $ jstest /dev/input/js1 > jstest: No such file or directory > > After the change: > $ jstest /dev/input/js0 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > ... > $ jstest /dev/input/js1 > Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > ... > > Signed-off-by: Michele Baldessari <michele@acksyn.org> > --- > drivers/hid/usbhid/hid-quirks.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c > index 1dff8f0015ba..f69049314a2c 100644 > --- a/drivers/hid/usbhid/hid-quirks.c > +++ b/drivers/hid/usbhid/hid-quirks.c > @@ -150,6 +150,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_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, > > { 0, 0 } > }; > Sorry but I don't believe that XIN_MO is the owner of the 16c0 VID so should not be given that ownership in linux. /Lars ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade 2015-10-25 9:15 ` Lars Melin @ 2015-10-25 16:34 ` Michele Baldessari 0 siblings, 0 replies; 8+ messages in thread From: Michele Baldessari @ 2015-10-25 16:34 UTC (permalink / raw) To: Lars Melin; +Cc: Jiri Kosina, linux-usb, linux-input, linux-kernel On Sun, Oct 25, 2015 at 04:15:17PM +0700, Lars Melin wrote: > On 2015-10-24 22:44, Michele Baldessari wrote: > >The Xin-Mo Dual Arcade controller (16c0:05e1) needs this quirk in order > >to have the two distinct joysticks working. > > > >Before the change: > >$ jstest /dev/input/js0 > >Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >... > >$ jstest /dev/input/js1 > >jstest: No such file or directory > > > >After the change: > >$ jstest /dev/input/js0 > >Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >... > >$ jstest /dev/input/js1 > >Joystick (Xin-Mo Xin-Mo Dual Arcade) has 2 axes (X, Y) > >... > > > >Signed-off-by: Michele Baldessari <michele@acksyn.org> > >--- > > drivers/hid/usbhid/hid-quirks.c | 1 + > > 1 file changed, 1 insertion(+) > > > >diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c > >index 1dff8f0015ba..f69049314a2c 100644 > >--- a/drivers/hid/usbhid/hid-quirks.c > >+++ b/drivers/hid/usbhid/hid-quirks.c > >@@ -150,6 +150,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_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, > > > > { 0, 0 } > > }; > > > > Sorry but I don't believe that XIN_MO is the owner of the 16c0 VID so should > not be given that ownership in linux. The "ownership" of 16c0 is a completely orthogonal issue to this patch. 16c0 was already defined (twice actually): $ grep -i 0x16c0 drivers/hid/hid-ids.h | awk '{ print $2 }' USB_VENDOR_ID_ATMEL_V_USB USB_VENDOR_ID_XIN_MO cheers, Michele -- Michele Baldessari <michele@acksyn.org> C2A5 9DA3 9961 4FFB E01B D0BC DDD4 DCCB 7515 5C6D ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-10-26 12:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-24 15:44 [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade Michele Baldessari
2015-10-24 20:11 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1510242210360.21100-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2015-10-26 11:00 ` Olivier Scherler
2015-10-26 11:00 ` Olivier Scherler
2015-10-26 12:06 ` Michele Baldessari
2015-10-26 12:06 ` Michele Baldessari
2015-10-25 9:15 ` Lars Melin
2015-10-25 16:34 ` Michele Baldessari
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.