diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-18 10:49:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-18 10:49:59 -0400 |
commit | d32466912ea1f5a0ced568c4884f6c7d335ea969 (patch) | |
tree | 3bc1b8d5f7b409767486883a2482e84807a47141 | |
parent | 74fe030532d779a3774fcc9e1ddce65f3773e156 (diff) | |
parent | 07146648bc6ea8b1530644c8a41bef55f1b2d952 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: update key codes for Apple aluminium
HID: fix comment in hid_input_report()
HID: BADPAD entry for NATSU Playstation USB adapter
HID: Use DIV_ROUND_UP
HID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbook
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-input.c | 22 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 6 |
4 files changed, 17 insertions, 15 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index d73a768e176e..f0b00ec1e47e 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -968,7 +968,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i | |||
968 | size--; | 968 | size--; |
969 | } | 969 | } |
970 | 970 | ||
971 | /* dump the report descriptor */ | 971 | /* dump the report */ |
972 | dbg_hid("report %d (size %u) = ", n, size); | 972 | dbg_hid("report %d (size %u) = ", n, size); |
973 | for (i = 0; i < size; i++) | 973 | for (i = 0; i < size; i++) |
974 | dbg_hid_line(" %02x", data[i]); | 974 | dbg_hid_line(" %02x", data[i]); |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 5a38fb27d69f..c3eb3f13e2ca 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -98,18 +98,16 @@ struct hidinput_key_translation { | |||
98 | 98 | ||
99 | static struct hidinput_key_translation apple_fn_keys[] = { | 99 | static struct hidinput_key_translation apple_fn_keys[] = { |
100 | { KEY_BACKSPACE, KEY_DELETE }, | 100 | { KEY_BACKSPACE, KEY_DELETE }, |
101 | { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY }, | 101 | { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY }, |
102 | { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY }, | 102 | { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY }, |
103 | { KEY_F3, KEY_CYCLEWINDOWS, APPLE_FLAG_FKEY }, /* Exposé */ | 103 | { KEY_F3, KEY_FN_F5, APPLE_FLAG_FKEY }, /* Exposé */ |
104 | { KEY_F4, KEY_FN_F4, APPLE_FLAG_FKEY }, /* Dashboard */ | 104 | { KEY_F4, KEY_FN_F4, APPLE_FLAG_FKEY }, /* Dashboard */ |
105 | { KEY_F5, KEY_FN_F5 }, | 105 | { KEY_F7, KEY_PREVIOUSSONG, APPLE_FLAG_FKEY }, |
106 | { KEY_F6, KEY_FN_F6 }, | 106 | { KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY }, |
107 | { KEY_F7, KEY_BACK, APPLE_FLAG_FKEY }, | 107 | { KEY_F9, KEY_NEXTSONG, APPLE_FLAG_FKEY }, |
108 | { KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY }, | 108 | { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY }, |
109 | { KEY_F9, KEY_FORWARD, APPLE_FLAG_FKEY }, | 109 | { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY }, |
110 | { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY }, | 110 | { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY }, |
111 | { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY }, | ||
112 | { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY }, | ||
113 | { KEY_UP, KEY_PAGEUP }, | 111 | { KEY_UP, KEY_PAGEUP }, |
114 | { KEY_DOWN, KEY_PAGEDOWN }, | 112 | { KEY_DOWN, KEY_PAGEDOWN }, |
115 | { KEY_LEFT, KEY_HOME }, | 113 | { KEY_LEFT, KEY_HOME }, |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index b38e559b7a46..d95979f0e028 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -278,7 +278,7 @@ static int hid_submit_ctrl(struct hid_device *hid) | |||
278 | usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0); | 278 | usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0); |
279 | maxpacket = usb_maxpacket(hid_to_usb_dev(hid), usbhid->urbctrl->pipe, 0); | 279 | maxpacket = usb_maxpacket(hid_to_usb_dev(hid), usbhid->urbctrl->pipe, 0); |
280 | if (maxpacket > 0) { | 280 | if (maxpacket > 0) { |
281 | padlen = (len + maxpacket - 1) / maxpacket; | 281 | padlen = DIV_ROUND_UP(len, maxpacket); |
282 | padlen *= maxpacket; | 282 | padlen *= maxpacket; |
283 | if (padlen > usbhid->bufsize) | 283 | if (padlen > usbhid->bufsize) |
284 | padlen = usbhid->bufsize; | 284 | padlen = usbhid->bufsize; |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index e6d05f6b1c1c..e29a057cbea2 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -345,6 +345,9 @@ | |||
345 | #define USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR 0x0400 | 345 | #define USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR 0x0400 |
346 | #define USB_DEVICE_ID_N_S_HARMONY 0xc359 | 346 | #define USB_DEVICE_ID_N_S_HARMONY 0xc359 |
347 | 347 | ||
348 | #define USB_VENDOR_ID_NATSU 0x08b7 | ||
349 | #define USB_DEVICE_ID_NATSU_GAMEPAD 0x0001 | ||
350 | |||
348 | #define USB_VENDOR_ID_NEC 0x073e | 351 | #define USB_VENDOR_ID_NEC 0x073e |
349 | #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 | 352 | #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 |
350 | 353 | ||
@@ -426,6 +429,7 @@ static const struct hid_blacklist { | |||
426 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 429 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
427 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 430 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
428 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 431 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
432 | { USB_VENDOR_ID_NATSU, USB_DEVICE_ID_NATSU_GAMEPAD, HID_QUIRK_BADPAD }, | ||
429 | { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD }, | 433 | { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD }, |
430 | { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD }, | 434 | { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD }, |
431 | { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD }, | 435 | { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD }, |
@@ -624,7 +628,7 @@ static const struct hid_blacklist { | |||
624 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, | 628 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, |
625 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN }, | 629 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN }, |
626 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 630 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
627 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD }, | 631 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
628 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 632 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
629 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_HAS_FN }, | 633 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_HAS_FN }, |
630 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, | 634 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, |