summaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2010-04-16 17:19:50 +0100
committerJiri Kosina <jkosina@suse.cz>2010-04-19 13:11:43 +0200
commitb5e5a37e36cd4d355b875665312d7aaae4e5833c (patch)
tree0c78a6367e115004ef5ebb237d3bc14d63e93d9d /drivers/hid/usbhid
parent75c28df87eb6d8e1389af67f26fbe2394e28385e (diff)
downloadblackbird-op-linux-b5e5a37e36cd4d355b875665312d7aaae4e5833c.tar.gz
blackbird-op-linux-b5e5a37e36cd4d355b875665312d7aaae4e5833c.zip
HID: add HID_QUIRK_HIDDEV_FORCE and HID_QUIRK_NO_IGNORE
Add two quirks to make it possible for usbhid module options to override whether a device is ignored (HID_QUIRK_NO_IGNORE) and whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE). Passing HID_QUIRK_NO_IGNORE for your device means that it will not be ignored by the HID layer, even if present in a blacklist. HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that device, making it accessible from user-space. Tested with an Apple IR Receiver, switching it from using appleir to using lirc's macmini driver. Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 9cd61a52e9e3..245aef0de8f2 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1143,6 +1143,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
hid->product = le16_to_cpu(dev->descriptor.idProduct);
hid->name[0] = 0;
+ hid->quirks = usbhid_lookup_quirk(hid->vendor, hid->product);
if (intf->cur_altsetting->desc.bInterfaceProtocol ==
USB_INTERFACE_PROTOCOL_MOUSE)
hid->type = HID_TYPE_USBMOUSE;
OpenPOWER on IntegriCloud