[Lucid] (pre-stable) HID: handle joysticks with large number of buttons

Colin Ian King colin.king at canonical.com
Mon Feb 22 15:07:55 UTC 2010


On Mon, 2010-02-22 at 15:21 +0100, Stefan Bader wrote:
> BugLink: http://bugs.launchpad.net/bugs/492056
> 
> Justification:
> 
> Impact: Since fixing tablets to be _not_ detected as joysticks, joysticks
> with a high number of buttons regressed to be detected as joysticks (due
> to assigning themselves buttons beyond the range allowed for joysticks).
> 
> Fix: Upstream changes (currently only in linux-next) add an overflow range
> for that and start assigning from those buttons if there are more than 15
> buttons.
> 
> Testcase: Verified in the bug report with a Saitek X52. Regression should
> not happen here as the additional range is only used for joystick devices
> that have more than 15 buttons.
> 
> 
Essentially lower buttons 0..15 are mapped as before onto
BTN_JOYSTICK..BTN_JOYSTICK+15 (0x120..0x12f) and buttons above this are
mapped to 0x2c0..0x2e7.  

Just a niggling question: Should there be any protection to stop buttons
41+ being mapped out of the BTN_TRIGGER_HAPPY range 0x2e8 upwards?

Colin





More information about the kernel-team mailing list