HID: add HID_QUIRK_HIDINPUT_FORCE
authorDaniel Mack <daniel@caiaq.de>
Mon, 12 Jul 2010 17:28:27 +0000 (19:28 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 19 Jul 2010 09:54:16 +0000 (11:54 +0200)
For devices with exotic HID report descriptors, it might be necessary to
make the HID core force the registration of an input device. Make that
possible by introducing a new quirk type.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
include/linux/hid.h

index 866e54ec5fb2eed324a122fda7b05944b36392c0..7ccee899b59ef6fb87863266848ac11cb8fac4bc 100644 (file)
@@ -1157,6 +1157,8 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
 
        if (hdev->quirks & HID_QUIRK_HIDDEV_FORCE)
                connect_mask |= (HID_CONNECT_HIDDEV_FORCE | HID_CONNECT_HIDDEV);
+       if (hdev->quirks & HID_QUIRK_HIDINPUT_FORCE)
+               connect_mask |= HID_CONNECT_HIDINPUT_FORCE;
        if (hdev->bus != BUS_USB)
                connect_mask &= ~HID_CONNECT_HIDDEV;
        if (hid_hiddev(hdev))
index 895001f7f4b22b93250142ff8fd28e4200dc2f24..42a0f1d1136540b5aada9f816a2289f687d01c57 100644 (file)
@@ -311,6 +311,7 @@ struct hid_item {
 #define HID_QUIRK_HIDDEV_FORCE                 0x00000010
 #define HID_QUIRK_BADPAD                       0x00000020
 #define HID_QUIRK_MULTI_INPUT                  0x00000040
+#define HID_QUIRK_HIDINPUT_FORCE               0x00000080
 #define HID_QUIRK_SKIP_OUTPUT_REPORTS          0x00010000
 #define HID_QUIRK_FULLSPEED_INTERVAL           0x10000000
 #define HID_QUIRK_NO_INIT_REPORTS              0x20000000