diff options
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 8c4c908177fa..de270b16bde3 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -902,9 +902,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
902 | map_key(BTN_1); | 902 | map_key(BTN_1); |
903 | } | 903 | } |
904 | 904 | ||
905 | if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) && | 905 | if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5 | |
906 | (usage->type == EV_REL) && (usage->code == REL_WHEEL)) | 906 | HID_QUIRK_2WHEEL_MOUSE_HACK_B8)) && (usage->type == EV_REL) && |
907 | set_bit(REL_HWHEEL, bit); | 907 | (usage->code == REL_WHEEL)) |
908 | set_bit(REL_HWHEEL, bit); | ||
908 | 909 | ||
909 | if (((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005)) | 910 | if (((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005)) |
910 | || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) | 911 | || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) |
@@ -1002,6 +1003,19 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct | |||
1002 | return; | 1003 | return; |
1003 | } | 1004 | } |
1004 | 1005 | ||
1006 | if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_B8) && | ||
1007 | (usage->type == EV_REL) && | ||
1008 | (usage->code == REL_WHEEL)) { | ||
1009 | hid->delayed_value = value; | ||
1010 | return; | ||
1011 | } | ||
1012 | |||
1013 | if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_B8) && | ||
1014 | (usage->hid == 0x000100b8)) { | ||
1015 | input_event(input, EV_REL, value ? REL_HWHEEL : REL_WHEEL, hid->delayed_value); | ||
1016 | return; | ||
1017 | } | ||
1018 | |||
1005 | if ((hid->quirks & HID_QUIRK_INVERT_HWHEEL) && (usage->code == REL_HWHEEL)) { | 1019 | if ((hid->quirks & HID_QUIRK_INVERT_HWHEEL) && (usage->code == REL_HWHEEL)) { |
1006 | input_event(input, usage->type, usage->code, -value); | 1020 | input_event(input, usage->type, usage->code, -value); |
1007 | return; | 1021 | return; |