lkml.org 
[lkml]   [2015]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: usbhid: Add a quirk for Xin-Mo Dual Arcade
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


\
 
 \ /
  Last update: 2015-10-26 13:21    [W:0.135 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site