Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH 1/2] also allow joysticks with buttons only
@ 2010-04-03 23:13 Christoph Fritz
  0 siblings, 0 replies; only message in thread
From: Christoph Fritz @ 2010-04-03 23:13 UTC (permalink / raw)
  To: linux-input; +Cc: Dmitry Torokhov, Dominic Cerquetti, Jan Kratochvil

dance pads don't have an axis, so allow this kind of
controller (joystick)


Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
 drivers/input/joydev.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index c52bec4..423e0e6 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -929,6 +929,24 @@ static const struct input_device_id joydev_ids[] = {
 		.evbit = { BIT_MASK(EV_ABS) },
 		.absbit = { BIT_MASK(ABS_THROTTLE) },
 	},
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+				INPUT_DEVICE_ID_MATCH_KEYBIT,
+		.evbit = { BIT_MASK(EV_KEY) },
+		.keybit = {[BIT_WORD(BTN_JOYSTICK)] = BIT_MASK(BTN_JOYSTICK) },
+	},
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+				INPUT_DEVICE_ID_MATCH_KEYBIT,
+		.evbit = { BIT_MASK(EV_KEY) },
+		.keybit = { [BIT_WORD(BTN_GAMEPAD)] = BIT_MASK(BTN_GAMEPAD) },
+	},
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+				INPUT_DEVICE_ID_MATCH_KEYBIT,
+		.evbit = { BIT_MASK(EV_KEY) },
+		.keybit = { [BIT_WORD(BTN_TRIGGER_HAPPY)] = BIT_MASK(BTN_TRIGGER_HAPPY) },
+	},
 	{ }	/* Terminating entry */
 };
 
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-03 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-03 23:13 [PATCH 1/2] also allow joysticks with buttons only Christoph Fritz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox