Re: [PATCH] HID: fix incorrect handling of devices with high button count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yOn Tue, 30 Oct 2012, Dmitry Torokhov wrote:

> On Mon, Oct 29, 2012 at 02:29:30PM +0100, Ingo Ruhnke wrote:
> > Button names for USB gamepads are currently assigned incorrectly, as
> > the evdev code assigned to buttons is "BTN_GAMEPAD + code", which on
> > devices with more then 16 buttons bleeds over into button names
> > reserved for graphic tablets (BTN_TOOL_PEN, etc.). This causes
> > problems further down the line as the device are now no longer
> > detected as joystick. This patch fixes that by assigning buttons
> > outside the range to BTN_TRIGGER_HAPPY (as is already the case for USB
> > joysticks).
> > 
> > Furthermore this patch corrects the assignment to BTN_TRIGGER_HAPPY,
> > as currently the first button over 16 is assigned to
> > BTN_TRIGGER_HAPPY17 (i.e. BTN_TRIGGER_HAPPY+0x10) not BTN_TRIGGER_HAPPY.
> > 
> > Signed-off-by: Ingo Ruhnke <grumbel@xxxxxxxxx>
> 
> Makes sense.
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Good catch indeed. Applied, thanks!

-- 
Jiri Kosina
SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux