diff options
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index ec5f470ff86a..339b90135d37 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1541,6 +1541,40 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
1541 | { } | 1541 | { } |
1542 | }; | 1542 | }; |
1543 | 1543 | ||
1544 | /** | ||
1545 | * hid_mouse_ignore_list - mouse devices which should not be handled by the hid layer | ||
1546 | * | ||
1547 | * There are composite devices for which we want to ignore only a certain | ||
1548 | * interface. This is a list of devices for which only the mouse interface will | ||
1549 | * be ignored. This allows a dedicated driver to take care of the interface. | ||
1550 | */ | ||
1551 | static const struct hid_device_id hid_mouse_ignore_list[] = { | ||
1552 | /* appletouch driver */ | ||
1553 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) }, | ||
1554 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) }, | ||
1555 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI) }, | ||
1556 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO) }, | ||
1557 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS) }, | ||
1558 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI) }, | ||
1559 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO) }, | ||
1560 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS) }, | ||
1561 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) }, | ||
1562 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) }, | ||
1563 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) }, | ||
1564 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) }, | ||
1565 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) }, | ||
1566 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) }, | ||
1567 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) }, | ||
1568 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) }, | ||
1569 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) }, | ||
1570 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, | ||
1571 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, | ||
1572 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, | ||
1573 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, | ||
1574 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | ||
1575 | { } | ||
1576 | }; | ||
1577 | |||
1544 | static bool hid_ignore(struct hid_device *hdev) | 1578 | static bool hid_ignore(struct hid_device *hdev) |
1545 | { | 1579 | { |
1546 | switch (hdev->vendor) { | 1580 | switch (hdev->vendor) { |
@@ -1557,6 +1591,10 @@ static bool hid_ignore(struct hid_device *hdev) | |||
1557 | break; | 1591 | break; |
1558 | } | 1592 | } |
1559 | 1593 | ||
1594 | if (hdev->type == HID_TYPE_USBMOUSE && | ||
1595 | hid_match_id(hdev, hid_mouse_ignore_list)) | ||
1596 | return true; | ||
1597 | |||
1560 | return !!hid_match_id(hdev, hid_ignore_list); | 1598 | return !!hid_match_id(hdev, hid_ignore_list); |
1561 | } | 1599 | } |
1562 | 1600 | ||