aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 18:23:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 18:23:49 -0400
commit5cf65713f87775c548e3eb48dbafa32e12f28000 (patch)
tree117442e28cddebb79246b1c4b871428e50b27fb1 /drivers
parentb7c8e55db7141dcbb9d5305a3260fa0ed62a1bcc (diff)
parent9f17d516416c88dfe18f4deee508fce763ddedb5 (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: (30 commits) Revert "HID: add support for the Wacom Intuos 4 wireless" HID: fix up Kconfig entry for ACRUX driver HID: add ACRUX game controller force feedback support HID: Force input registration for "VEC footpedal" HID: add HID_QUIRK_HIDINPUT_FORCE HID: hid-input.c: indentation fixes HID: hiddev: use usb_find_interface, get rid of BKL HID: ignore digitizer usage Undefined (0x00) HID: Add support for Conceptronic CLLRCMCE HID: hid-ids.h: Whitespace fixup, align using TABs HID: picolcd: implement refcounting of framebuffer HID: picolcd: do not reallocate memory on depth change HID: picolcd: Add minimal palette required by fbcon on 8bpp HID: magicmouse: Correct parsing of large X and Y motions. HID: magicmouse: report last touch up HID: picolcd: fix deferred_io init/cleanup to fb ordering HID: hid-ids.h: keep vendor ids in alphabetical order HID: add proper support for Elecom BM084 bluetooth mouse HID: magicmouse: enable horizontal scrolling HID: magicmouse: add param for scroll speed ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/Kconfig19
-rw-r--r--drivers/hid/Makefile2
-rw-r--r--drivers/hid/hid-axff.c172
-rw-r--r--drivers/hid/hid-core.c8
-rw-r--r--drivers/hid/hid-elecom.c57
-rw-r--r--drivers/hid/hid-ids.h91
-rw-r--r--drivers/hid/hid-input.c21
-rw-r--r--drivers/hid/hid-magicmouse.c96
-rw-r--r--drivers/hid/hid-picolcd.c199
-rw-r--r--drivers/hid/hid-roccat-kone.c25
-rw-r--r--drivers/hid/hid-roccat-kone.h2
-rw-r--r--drivers/hid/hid-roccat.c9
-rw-r--r--drivers/hid/hid-roccat.h2
-rw-r--r--drivers/hid/hid-topseed.c5
-rw-r--r--drivers/hid/hid-wacom.c2
-rw-r--r--drivers/hid/hidraw.c2
-rw-r--r--drivers/hid/usbhid/hid-quirks.c2
-rw-r--r--drivers/hid/usbhid/hiddev.c54
18 files changed, 585 insertions, 183 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 434099369058..6369ba7f96f8 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -68,6 +68,14 @@ 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
71config HID_ACRUX_FF
72 tristate "ACRUX force feedback support"
73 depends on USB_HID
74 select INPUT_FF_MEMLESS
75 ---help---
76 Say Y here if you want to enable force feedback support for ACRUX
77 game controllers.
78
71config HID_APPLE 79config HID_APPLE
72 tristate "Apple" if EMBEDDED 80 tristate "Apple" if EMBEDDED
73 depends on (USB_HID || BT_HIDP) 81 depends on (USB_HID || BT_HIDP)
@@ -148,6 +156,12 @@ config HID_EGALAX
148 ---help--- 156 ---help---
149 Support for the eGalax dual-touch panel. 157 Support for the eGalax dual-touch panel.
150 158
159config HID_ELECOM
160 tristate "ELECOM"
161 depends on BT_HIDP
162 ---help---
163 Support for the ELECOM BM084 (bluetooth mouse).
164
151config HID_EZKEY 165config HID_EZKEY
152 tristate "Ezkey" if EMBEDDED 166 tristate "Ezkey" if EMBEDDED
153 depends on USB_HID 167 depends on USB_HID
@@ -417,10 +431,11 @@ config SMARTJOYPLUS_FF
417 enable force feedback support for it. 431 enable force feedback support for it.
418 432
419config HID_TOPSEED 433config HID_TOPSEED
420 tristate "TopSeed Cyberlink remote control support" 434 tristate "TopSeed Cyberlink, BTC Emprex, Conceptronic remote control support"
421 depends on USB_HID 435 depends on USB_HID
422 ---help--- 436 ---help---
423 Say Y if you have a TopSeed Cyberlink or BTC Emprex remote control. 437 Say Y if you have a TopSeed Cyberlink or BTC Emprex or Conceptronic
438 CLLRCMCE remote control.
424 439
425config HID_THRUSTMASTER 440config HID_THRUSTMASTER
426 tristate "ThrustMaster devices support" 441 tristate "ThrustMaster devices support"
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 987fa0627367..46f037f3df80 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -24,6 +24,7 @@ endif
24 24
25obj-$(CONFIG_HID_3M_PCT) += hid-3m-pct.o 25obj-$(CONFIG_HID_3M_PCT) += hid-3m-pct.o
26obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o 26obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
27obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o
27obj-$(CONFIG_HID_APPLE) += hid-apple.o 28obj-$(CONFIG_HID_APPLE) += hid-apple.o
28obj-$(CONFIG_HID_BELKIN) += hid-belkin.o 29obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
29obj-$(CONFIG_HID_CANDO) += hid-cando.o 30obj-$(CONFIG_HID_CANDO) += hid-cando.o
@@ -32,6 +33,7 @@ obj-$(CONFIG_HID_CHICONY) += hid-chicony.o
32obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o 33obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
33obj-$(CONFIG_HID_DRAGONRISE) += hid-drff.o 34obj-$(CONFIG_HID_DRAGONRISE) += hid-drff.o
34obj-$(CONFIG_HID_EGALAX) += hid-egalax.o 35obj-$(CONFIG_HID_EGALAX) += hid-egalax.o
36obj-$(CONFIG_HID_ELECOM) += hid-elecom.o
35obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o 37obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
36obj-$(CONFIG_HID_GYRATION) += hid-gyration.o 38obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
37obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o 39obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o
diff --git a/drivers/hid/hid-axff.c b/drivers/hid/hid-axff.c
new file mode 100644
index 000000000000..f42ee140738a
--- /dev/null
+++ b/drivers/hid/hid-axff.c
@@ -0,0 +1,172 @@
1/*
2 * Force feedback support for ACRUX game controllers
3 *
4 * From what I have gathered, these devices are mass produced in China
5 * by several vendors. They often share the same design as the original
6 * Xbox 360 controller.
7 *
8 * 1a34:0802 "ACRUX USB GAMEPAD 8116"
9 * - tested with a EXEQ EQ-PCU-02090 game controller.
10 *
11 * Copyright (c) 2010 Sergei Kolzun <x0r@dv-life.ru>
12 */
13
14/*
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 */
29
30#include <linux/input.h>
31#include <linux/slab.h>
32#include <linux/usb.h>
33#include <linux/hid.h>
34
35#include "hid-ids.h"
36#include "usbhid/usbhid.h"
37
38struct axff_device {
39 struct hid_report *report;
40};
41
42static int axff_play(struct input_dev *dev, void *data, struct ff_effect *effect)
43{
44 struct hid_device *hid = input_get_drvdata(dev);
45 struct axff_device *axff = data;
46 int left, right;
47
48 left = effect->u.rumble.strong_magnitude;
49 right = effect->u.rumble.weak_magnitude;
50
51 dbg_hid("called with 0x%04x 0x%04x", left, right);
52
53 left = left * 0xff / 0xffff;
54 right = right * 0xff / 0xffff;
55
56 axff->report->field[0]->value[0] = left;
57 axff->report->field[1]->value[0] = right;
58 axff->report->field[2]->value[0] = left;
59 axff->report->field[3]->value[0] = right;
60 dbg_hid("running with 0x%02x 0x%02x", left, right);
61 usbhid_submit_report(hid, axff->report, USB_DIR_OUT);
62
63 return 0;
64}
65
66static int axff_init(struct hid_device *hid)
67{
68 struct axff_device *axff;
69 struct hid_report *report;
70 struct hid_input *hidinput = list_first_entry(&hid->inputs, struct hid_input, list);
71 struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list;
72 struct input_dev *dev = hidinput->input;
73 int error;
74
75 if (list_empty(report_list)) {
76 dev_err(&hid->dev, "no output reports found\n");
77 return -ENODEV;
78 }
79
80 report = list_first_entry(report_list, struct hid_report, list);
81
82 if (report->maxfield < 4) {
83 dev_err(&hid->dev, "no fields in the report: %d\n", report->maxfield);
84 return -ENODEV;
85 }
86
87 axff = kzalloc(sizeof(struct axff_device), GFP_KERNEL);
88 if (!axff)
89 return -ENOMEM;
90
91 set_bit(FF_RUMBLE, dev->ffbit);