Commit 3a8dc5ea authored by Vojtech Pavlik's avatar Vojtech Pavlik

input: Enable scancode event generation in the HID driver. This should allow

       changing HID->event mappings (via EVIOCS*) in the future and make 
       debugging easier now.
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
parent 85b99875
...@@ -403,11 +403,12 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct ...@@ -403,11 +403,12 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
if (!input) if (!input)
return; return;
input_regs(input, regs);
input_event(input, EV_MSC, MSC_SCAN, usage->hid);
if (!usage->type) if (!usage->type)
return; return;
input_regs(input, regs);
if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005)) if (((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005))
|| ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) { || ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) {
if (value) hid->quirks |= HID_QUIRK_2WHEEL_MOUSE_HACK_ON; if (value) hid->quirks |= HID_QUIRK_2WHEEL_MOUSE_HACK_ON;
...@@ -574,6 +575,9 @@ int hidinput_connect(struct hid_device *hid) ...@@ -574,6 +575,9 @@ int hidinput_connect(struct hid_device *hid)
hidinput->input.id.product = le16_to_cpu(dev->descriptor.idProduct); hidinput->input.id.product = le16_to_cpu(dev->descriptor.idProduct);
hidinput->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice); hidinput->input.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
hidinput->input.dev = &hid->intf->dev; hidinput->input.dev = &hid->intf->dev;
set_bit(EV_MSC, hidinput->input.evbit);
set_bit(MSC_SCAN, hidinput->input.mscbit);
} }
for (i = 0; i < report->maxfield; i++) for (i = 0; i < report->maxfield; 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