diff options
author | Vojtech Pavlik <vojtech@suse.cz> | 2005-09-05 01:13:15 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-09-05 01:13:15 -0400 |
commit | c58de6d949a9d2c386c4d814013b6c967c14ea5a (patch) | |
tree | 4b47ed0557e95151119e91a1763a582e6bb9a05c /drivers/usb/input | |
parent | c4786ca8a4274a0bbffe217917972943348bed64 (diff) |
Input: HID - add a quirk for the Apple Powermouse
Add a quirk for the Apple Powermouse, remapping GenericDesktop.Z to
Rel.HWheel, to allow horizontal scrolling in Linux.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input')
-rw-r--r-- | drivers/usb/input/hid-core.c | 3 | ||||
-rw-r--r-- | drivers/usb/input/hid-input.c | 3 | ||||
-rw-r--r-- | drivers/usb/input/hid.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 7d5eb4deb1ef..661709a35b0e 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -1442,6 +1442,8 @@ void hid_init_reports(struct hid_device *hid) | |||
1442 | #define USB_DEVICE_ID_NETWORKANALYSER 0x2020 | 1442 | #define USB_DEVICE_ID_NETWORKANALYSER 0x2020 |
1443 | #define USB_DEVICE_ID_POWERCONTROL 0x2030 | 1443 | #define USB_DEVICE_ID_POWERCONTROL 0x2030 |
1444 | 1444 | ||
1445 | #define USB_VENDOR_ID_APPLE 0x05ac | ||
1446 | #define USB_DEVICE_ID_APPLE_POWERMOUSE 0x0304 | ||
1445 | 1447 | ||
1446 | /* | 1448 | /* |
1447 | * Alphabetically sorted blacklist by quirk type. | 1449 | * Alphabetically sorted blacklist by quirk type. |
@@ -1546,6 +1548,7 @@ static struct hid_blacklist { | |||
1546 | { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_USBHUB_KB, HID_QUIRK_NOGET}, | 1548 | { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_USBHUB_KB, HID_QUIRK_NOGET}, |
1547 | { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET }, | 1549 | { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET }, |
1548 | 1550 | ||
1551 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_POWERMOUSE, HID_QUIRK_2WHEEL_POWERMOUSE }, | ||
1549 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, | 1552 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, |
1550 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, | 1553 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, |
1551 | 1554 | ||
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index 22f9d919a3f2..14acfc579f86 100644 --- a/drivers/usb/input/hid-input.c +++ b/drivers/usb/input/hid-input.c | |||
@@ -396,6 +396,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
396 | if (usage->code > max) | 396 | if (usage->code > max) |
397 | goto ignore; | 397 | goto ignore; |
398 | 398 | ||
399 | if (((device->quirks & (HID_QUIRK_2WHEEL_POWERMOUSE)) && (usage->hid == 0x00010032))) | ||
400 | map_rel(REL_HWHEEL); | ||
401 | |||
399 | if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) && | 402 | if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) && |
400 | (usage->type == EV_REL) && (usage->code == REL_WHEEL)) | 403 | (usage->type == EV_REL) && (usage->code == REL_WHEEL)) |
401 | set_bit(REL_HWHEEL, bit); | 404 | set_bit(REL_HWHEEL, bit); |
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h index d76bbc81f6a8..47f75a43a468 100644 --- a/drivers/usb/input/hid.h +++ b/drivers/usb/input/hid.h | |||
@@ -245,6 +245,7 @@ struct hid_item { | |||
245 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x080 | 245 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x080 |
246 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x100 | 246 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x100 |
247 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200 | 247 | #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200 |
248 | #define HID_QUIRK_2WHEEL_POWERMOUSE 0x400 | ||
248 | 249 | ||
249 | /* | 250 | /* |
250 | * This is the global environment of the parser. This information is | 251 | * This is the global environment of the parser. This information is |