Commit 6c6212aa authored by Tim Schumacher's avatar Tim Schumacher Committed by Dmitry Torokhov

Input: iforce - assign BTN_DEAD only for specific devices

Move BTN_DEAD into the arrays with the specific button sets
instead of assigning it for every iforce device.

BTN_DEAD represents an optical sensor which detects if the
user is interacting with the device. On devices without that
optical sensor BTN_DEAD is repeatedly causing false inputs
on every status update of the joystick.
Signed-off-by: default avatarTim Schumacher <timschumi@gmx.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 305180bc
...@@ -29,19 +29,21 @@ MODULE_LICENSE("GPL"); ...@@ -29,19 +29,21 @@ MODULE_LICENSE("GPL");
static signed short btn_joystick[] = static signed short btn_joystick[] =
{ BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, { BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE,
BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A, BTN_B, BTN_C, -1 }; BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A,
BTN_B, BTN_C, BTN_DEAD, -1 };
static signed short btn_avb_pegasus[] = static signed short btn_avb_pegasus[] =
{ BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, { BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE,
BTN_BASE2, BTN_BASE3, BTN_BASE4, -1 }; BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_DEAD, -1 };
static signed short btn_wheel[] = static signed short btn_wheel[] =
{ BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE, { BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_TOP2, BTN_BASE,
BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A, BTN_B, BTN_C, -1 }; BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_BASE5, BTN_A,
BTN_B, BTN_C, BTN_DEAD, -1 };
static signed short btn_avb_tw[] = static signed short btn_avb_tw[] =
{ BTN_TRIGGER, BTN_THUMB, BTN_TOP, BTN_TOP2, BTN_BASE, { BTN_TRIGGER, BTN_THUMB, BTN_TOP, BTN_TOP2, BTN_BASE,
BTN_BASE2, BTN_BASE3, BTN_BASE4, -1 }; BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_DEAD, -1 };
static signed short btn_avb_wheel[] = static signed short btn_avb_wheel[] =
{ BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_BASE, BTN_BASE2, BTN_BASE3, { BTN_GEAR_DOWN, BTN_GEAR_UP, BTN_BASE, BTN_BASE2, BTN_BASE3,
...@@ -384,7 +386,6 @@ int iforce_init_device(struct iforce *iforce) ...@@ -384,7 +386,6 @@ int iforce_init_device(struct iforce *iforce)
for (i = 0; iforce->type->btn[i] >= 0; i++) for (i = 0; iforce->type->btn[i] >= 0; i++)
set_bit(iforce->type->btn[i], input_dev->keybit); set_bit(iforce->type->btn[i], input_dev->keybit);
set_bit(BTN_DEAD, input_dev->keybit);
for (i = 0; iforce->type->abs[i] >= 0; i++) { for (i = 0; iforce->type->abs[i] >= 0; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment