diff options
-rw-r--r-- | drivers/hid/Kconfig | 43 | ||||
-rw-r--r-- | drivers/hid/hid-logitech-dj.c | 38 | ||||
-rw-r--r-- | drivers/hid/hid-magicmouse.c | 6 | ||||
-rw-r--r-- | drivers/hid/usbhid/Kconfig | 8 | ||||
-rw-r--r-- | net/bluetooth/hidp/Kconfig | 2 |
5 files changed, 53 insertions, 44 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 034c80a10f1f..bef04c192768 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -1,20 +1,11 @@ | |||
1 | # | 1 | # |
2 | # HID driver configuration | 2 | # HID driver configuration |
3 | # | 3 | # |
4 | menuconfig HID_SUPPORT | 4 | menu "HID support" |
5 | bool "HID Devices" | 5 | depends on INPUT |
6 | depends on INPUT | ||
7 | default y | ||
8 | ---help--- | ||
9 | Say Y here to get to see options for various computer-human interface | ||
10 | device drivers. This option alone does not add any kernel code. | ||
11 | |||
12 | If you say N, all options in this submenu will be skipped and disabled. | ||
13 | |||
14 | if HID_SUPPORT | ||
15 | 6 | ||
16 | config HID | 7 | config HID |
17 | tristate "Generic HID support" | 8 | tristate "HID bus support" |
18 | depends on INPUT | 9 | depends on INPUT |
19 | default y | 10 | default y |
20 | ---help--- | 11 | ---help--- |
@@ -23,14 +14,17 @@ config HID | |||
23 | most commonly used to refer to the USB-HID specification, but other | 14 | most commonly used to refer to the USB-HID specification, but other |
24 | devices (such as, but not strictly limited to, Bluetooth) are | 15 | devices (such as, but not strictly limited to, Bluetooth) are |
25 | designed using HID specification (this involves certain keyboards, | 16 | designed using HID specification (this involves certain keyboards, |
26 | mice, tablets, etc). This option compiles into kernel the generic | 17 | mice, tablets, etc). This option adds the HID bus to the kernel, |
27 | HID layer code (parser, usages, etc.), which can then be used by | 18 | together with generic HID layer code. The HID devices are added and |
28 | transport-specific HID implementation (like USB or Bluetooth). | 19 | removed from the HID bus by the transport-layer drivers, such as |
20 | usbhid (USB_HID) and hidp (BT_HIDP). | ||
29 | 21 | ||
30 | For docs and specs, see http://www.usb.org/developers/hidpage/ | 22 | For docs and specs, see http://www.usb.org/developers/hidpage/ |
31 | 23 | ||
32 | If unsure, say Y. | 24 | If unsure, say Y. |
33 | 25 | ||
26 | if HID | ||
27 | |||
34 | config HID_BATTERY_STRENGTH | 28 | config HID_BATTERY_STRENGTH |
35 | bool "Battery level reporting for HID devices" | 29 | bool "Battery level reporting for HID devices" |
36 | depends on HID && POWER_SUPPLY && HID = POWER_SUPPLY | 30 | depends on HID && POWER_SUPPLY && HID = POWER_SUPPLY |
@@ -59,23 +53,22 @@ config HIDRAW | |||
59 | 53 | ||
60 | If unsure, say Y. | 54 | If unsure, say Y. |
61 | 55 | ||
62 | source "drivers/hid/usbhid/Kconfig" | ||
63 | |||
64 | menu "Special HID drivers" | ||
65 | depends on HID | ||
66 | |||
67 | config HID_GENERIC | 56 | config HID_GENERIC |
68 | tristate "Generic HID driver" | 57 | tristate "Generic HID driver" |
69 | depends on HID | 58 | depends on HID |
70 | default y | 59 | default HID |
71 | ---help--- | 60 | ---help--- |
72 | Support for generic HID devices. | 61 | Support for generic devices on the HID bus. This includes most |
62 | keyboards and mice, joysticks, tablets and digitizers. | ||
73 | 63 | ||
74 | To compile this driver as a module, choose M here: the module | 64 | To compile this driver as a module, choose M here: the module |
75 | will be called hid-generic. | 65 | will be called hid-generic. |
76 | 66 | ||
77 | If unsure, say Y. | 67 | If unsure, say Y. |
78 | 68 | ||
69 | menu "Special HID drivers" | ||
70 | depends on HID | ||
71 | |||
79 | config HID_A4TECH | 72 | config HID_A4TECH |
80 | tristate "A4 tech mice" if EXPERT | 73 | tristate "A4 tech mice" if EXPERT |
81 | depends on USB_HID | 74 | depends on USB_HID |
@@ -662,4 +655,8 @@ config HID_ZYDACRON | |||
662 | 655 | ||
663 | endmenu | 656 | endmenu |
664 | 657 | ||
665 | endif # HID_SUPPORT | 658 | endif # HID |
659 | |||
660 | source "drivers/hid/usbhid/Kconfig" | ||
661 | |||
662 | endmenu | ||
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 5e8a7ed42344..0f9c146fc00d 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c | |||
@@ -436,27 +436,37 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, | |||
436 | 436 | ||
437 | static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) | 437 | static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev) |
438 | { | 438 | { |
439 | struct dj_report dj_report; | 439 | struct dj_report *dj_report; |
440 | int retval; | ||
440 | 441 | ||
441 | memset(&dj_report, 0, sizeof(dj_report)); | 442 | dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL); |
442 | dj_report.report_id = REPORT_ID_DJ_SHORT; | 443 | if (!dj_report) |
443 | dj_report.device_index = 0xFF; | 444 | return -ENOMEM; |
444 | dj_report.report_type = REPORT_TYPE_CMD_GET_PAIRED_DEVICES; | 445 | dj_report->report_id = REPORT_ID_DJ_SHORT; |
445 | return logi_dj_recv_send_report(djrcv_dev, &dj_report); | 446 | dj_report->device_index = 0xFF; |
447 | dj_report->report_type = REPORT_TYPE_CMD_GET_PAIRED_DEVICES; | ||
448 | retval = logi_dj_recv_send_report(djrcv_dev, dj_report); | ||
449 | kfree(dj_report); | ||
450 | return retval; | ||
446 | } | 451 | } |
447 | 452 | ||
448 | static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev, | 453 | static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev, |
449 | unsigned timeout) | 454 | unsigned timeout) |
450 | { | 455 | { |
451 | struct dj_report dj_report; | 456 | struct dj_report *dj_report; |
457 | int retval; | ||
452 | 458 | ||
453 | memset(&dj_report, 0, sizeof(dj_report)); | 459 | dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL); |
454 | dj_report.report_id = REPORT_ID_DJ_SHORT; | 460 | if (!dj_report) |
455 | dj_report.device_index = 0xFF; | 461 | return -ENOMEM; |
456 | dj_report.report_type = REPORT_TYPE_CMD_SWITCH; | 462 | dj_report->report_id = REPORT_ID_DJ_SHORT; |
457 | dj_report.report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x3F; | 463 | dj_report->device_index = 0xFF; |
458 | dj_report.report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout; | 464 | dj_report->report_type = REPORT_TYPE_CMD_SWITCH; |
459 | return logi_dj_recv_send_report(djrcv_dev, &dj_report); | 465 | dj_report->report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x3F; |
466 | dj_report->report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] = (u8)timeout; | ||
467 | retval = logi_dj_recv_send_report(djrcv_dev, dj_report); | ||
468 | kfree(dj_report); | ||
469 | return retval; | ||
460 | } | 470 | } |
461 | 471 | ||
462 | 472 | ||
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 7cf3ffe4b7bc..40ac6654f1d1 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
@@ -426,8 +426,10 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h | |||
426 | __set_bit(EV_ABS, input->evbit); | 426 | __set_bit(EV_ABS, input->evbit); |
427 | 427 | ||
428 | input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0); | 428 | input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0); |
429 | input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0); | 429 | input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255 << 2, |
430 | input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0); | 430 | 4, 0); |
431 | input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255 << 2, | ||
432 | 4, 0); | ||
431 | input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); | 433 | input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0); |
432 | 434 | ||
433 | /* Note: Touch Y position from the device is inverted relative | 435 | /* Note: Touch Y position from the device is inverted relative |
diff --git a/drivers/hid/usbhid/Kconfig b/drivers/hid/usbhid/Kconfig index 0f20fd17cf06..0108c5991a04 100644 --- a/drivers/hid/usbhid/Kconfig +++ b/drivers/hid/usbhid/Kconfig | |||
@@ -1,13 +1,13 @@ | |||
1 | comment "USB Input Devices" | 1 | menu "USB HID support" |
2 | depends on USB | 2 | depends on USB |
3 | 3 | ||
4 | config USB_HID | 4 | config USB_HID |
5 | tristate "USB Human Interface Device (full HID) support" | 5 | tristate "USB HID transport layer" |
6 | default y | 6 | default y |
7 | depends on USB && INPUT | 7 | depends on USB && INPUT |
8 | select HID | 8 | select HID |
9 | ---help--- | 9 | ---help--- |
10 | Say Y here if you want full HID support to connect USB keyboards, | 10 | Say Y here if you want to connect USB keyboards, |
11 | mice, joysticks, graphic tablets, or any other HID based devices | 11 | mice, joysticks, graphic tablets, or any other HID based devices |
12 | to your computer via USB, as well as Uninterruptible Power Supply | 12 | to your computer via USB, as well as Uninterruptible Power Supply |
13 | (UPS) and monitor control devices. | 13 | (UPS) and monitor control devices. |
@@ -81,4 +81,4 @@ config USB_MOUSE | |||
81 | 81 | ||
82 | endmenu | 82 | endmenu |
83 | 83 | ||
84 | 84 | endmenu | |
diff --git a/net/bluetooth/hidp/Kconfig b/net/bluetooth/hidp/Kconfig index 4deaca78e91e..9332bc7aa851 100644 --- a/net/bluetooth/hidp/Kconfig +++ b/net/bluetooth/hidp/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config BT_HIDP | 1 | config BT_HIDP |
2 | tristate "HIDP protocol support" | 2 | tristate "HIDP protocol support" |
3 | depends on BT && INPUT && HID_SUPPORT | 3 | depends on BT && INPUT |
4 | select HID | 4 | select HID |
5 | help | 5 | help |
6 | HIDP (Human Interface Device Protocol) is a transport layer | 6 | HIDP (Human Interface Device Protocol) is a transport layer |