diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/Kconfig | 10 | ||||
-rw-r--r-- | drivers/hid/Makefile | 2 | ||||
-rw-r--r-- | drivers/hid/hid-axff.c | 31 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 2 |
4 files changed, 37 insertions, 8 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 5fa0b952914c..d942d421af51 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -68,9 +68,15 @@ config HID_A4TECH | |||
68 | ---help--- | 68 | ---help--- |
69 | Support for A4 tech X5 and WOP-35 / Trust 450L mice. | 69 | Support for A4 tech X5 and WOP-35 / Trust 450L mice. |
70 | 70 | ||
71 | config HID_ACRUX_FF | 71 | config HID_ACRUX |
72 | tristate "ACRUX force feedback" | 72 | tristate "ACRUX game controller support" |
73 | depends on USB_HID | 73 | depends on USB_HID |
74 | ---help--- | ||
75 | Say Y here if you want to enable support for ACRUX game controllers. | ||
76 | |||
77 | config HID_ACRUX_FF | ||
78 | tristate "ACRUX force feedback support" | ||
79 | depends on HID_ACRUX | ||
74 | select INPUT_FF_MEMLESS | 80 | select INPUT_FF_MEMLESS |
75 | ---help--- | 81 | ---help--- |
76 | Say Y here if you want to enable force feedback support for ACRUX | 82 | Say Y here if you want to enable force feedback support for ACRUX |
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 569647763d1b..125ba103eba0 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
@@ -27,7 +27,7 @@ endif | |||
27 | 27 | ||
28 | obj-$(CONFIG_HID_3M_PCT) += hid-3m-pct.o | 28 | obj-$(CONFIG_HID_3M_PCT) += hid-3m-pct.o |
29 | obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o | 29 | obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o |
30 | obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o | 30 | obj-$(CONFIG_HID_ACRUX) += hid-axff.o |
31 | obj-$(CONFIG_HID_APPLE) += hid-apple.o | 31 | obj-$(CONFIG_HID_APPLE) += hid-apple.o |
32 | obj-$(CONFIG_HID_BELKIN) += hid-belkin.o | 32 | obj-$(CONFIG_HID_BELKIN) += hid-belkin.o |
33 | obj-$(CONFIG_HID_CANDO) += hid-cando.o | 33 | obj-$(CONFIG_HID_CANDO) += hid-cando.o |
diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c index e5b961d6ff22..b4554288de00 100644 --- a/drivers/hid/hid-axff.c +++ b/drivers/hid/hid-axff.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/hid.h> | 33 | #include <linux/hid.h> |
34 | 34 | ||
35 | #include "hid-ids.h" | 35 | #include "hid-ids.h" |
36 | |||
37 | #ifdef CONFIG_HID_ACRUX_FF | ||
36 | #include "usbhid/usbhid.h" | 38 | #include "usbhid/usbhid.h" |
37 | 39 | ||
38 | struct axff_device { | 40 | struct axff_device { |
@@ -109,6 +111,12 @@ err_free_mem: | |||
109 | kfree(axff); | 111 | kfree(axff); |
110 | return error; | 112 | return error; |
111 | } | 113 | } |
114 | #else | ||
115 | static inline int axff_init(struct hid_device *hid) | ||
116 | { | ||
117 | return 0; | ||
118 | } | ||
119 | #endif | ||
112 | 120 | ||
113 | static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) | 121 | static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) |
114 | { | 122 | { |
@@ -139,9 +147,25 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
139 | error); | 147 | error); |
140 | } | 148 | } |
141 | 149 | ||
150 | /* | ||
151 | * We need to start polling device right away, otherwise | ||
152 | * it will go into a coma. | ||
153 | */ | ||
154 | error = hid_hw_open(hdev); | ||
155 | if (error) { | ||
156 | dev_err(&hdev->dev, "hw open failed\n"); | ||
157 | return error; | ||
158 | } | ||
159 | |||
142 | return 0; | 160 | return 0; |
143 | } | 161 | } |
144 | 162 | ||
163 | static void ax_remove(struct hid_device *hdev) | ||
164 | { | ||
165 | hid_hw_close(hdev); | ||
166 | hid_hw_stop(hdev); | ||
167 | } | ||
168 | |||
145 | static const struct hid_device_id ax_devices[] = { | 169 | static const struct hid_device_id ax_devices[] = { |
146 | { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802), }, | 170 | { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802), }, |
147 | { } | 171 | { } |
@@ -149,9 +173,10 @@ static const struct hid_device_id ax_devices[] = { | |||
149 | MODULE_DEVICE_TABLE(hid, ax_devices); | 173 | MODULE_DEVICE_TABLE(hid, ax_devices); |
150 | 174 | ||
151 | static struct hid_driver ax_driver = { | 175 | static struct hid_driver ax_driver = { |
152 | .name = "acrux", | 176 | .name = "acrux", |
153 | .id_table = ax_devices, | 177 | .id_table = ax_devices, |
154 | .probe = ax_probe, | 178 | .probe = ax_probe, |
179 | .remove = ax_remove, | ||
155 | }; | 180 | }; |
156 | 181 | ||
157 | static int __init ax_init(void) | 182 | static int __init ax_init(void) |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 570db37d574d..c650efb52a45 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1289,9 +1289,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1289 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) }, | 1289 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) }, |
1290 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) }, | 1290 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) }, |
1291 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) }, | 1291 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) }, |
1292 | #if defined(CONFIG_HID_ACRUX_FF) || defined(CONFIG_HID_ACRUX_FF_MODULE) | ||
1293 | { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) }, | 1292 | { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) }, |
1294 | #endif | ||
1295 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) }, | 1293 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) }, |
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, | 1294 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, |
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) }, |