diff options
author | Richard Nauber <richard.nauber@googlemail.com> | 2010-06-28 12:54:25 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-28 13:02:47 -0400 |
commit | 64b386ea16112564e0b93473e2c347125effb6b2 (patch) | |
tree | f09a8f9e93c267c4f9039f9f246bea95cf2347a6 /drivers/hid | |
parent | 83efb8fe671af3c7b5613868aadc93ce973b6c3d (diff) |
HID: add proper support for Elecom BM084 bluetooth mouse
This patch removes the annoying feature of Elecoms BM084 to constantly scroll to the right.
The device can be found at:
http://www.dealextreme.com/details.dx/sku.15402
Signed-off-by: Richard Nauber <Richard.Nauber@gmail.com>
[jkosina@suse.cz: fix build error]
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/Kconfig | 6 | ||||
-rw-r--r-- | drivers/hid/Makefile | 1 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-elecom.c | 57 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 3 |
5 files changed, 68 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 76ba59b9fea1..ecc11405922a 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -148,6 +148,12 @@ config HID_EGALAX | |||
148 | ---help--- | 148 | ---help--- |
149 | Support for the eGalax dual-touch panel. | 149 | Support for the eGalax dual-touch panel. |
150 | 150 | ||
151 | config HID_ELECOM | ||
152 | tristate "ELECOM" | ||
153 | depends on BT_HIDP | ||
154 | ---help--- | ||
155 | Support for the ELECOM BM084 (bluetooth mouse). | ||
156 | |||
151 | config HID_EZKEY | 157 | config HID_EZKEY |
152 | tristate "Ezkey" if EMBEDDED | 158 | tristate "Ezkey" if EMBEDDED |
153 | depends on USB_HID | 159 | depends on USB_HID |
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 22e47eaeea32..3a6eb7ec42e2 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
@@ -32,6 +32,7 @@ obj-$(CONFIG_HID_CHICONY) += hid-chicony.o | |||
32 | obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o | 32 | obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o |
33 | obj-$(CONFIG_HID_DRAGONRISE) += hid-drff.o | 33 | obj-$(CONFIG_HID_DRAGONRISE) += hid-drff.o |
34 | obj-$(CONFIG_HID_EGALAX) += hid-egalax.o | 34 | obj-$(CONFIG_HID_EGALAX) += hid-egalax.o |
35 | obj-$(CONFIG_HID_ELECOM) += hid-elecom.o | ||
35 | obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o | 36 | obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o |
36 | obj-$(CONFIG_HID_GYRATION) += hid-gyration.o | 37 | obj-$(CONFIG_HID_GYRATION) += hid-gyration.o |
37 | obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o | 38 | obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index e10e314d38cc..20bccd4d488a 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1294,6 +1294,7 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1294 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, | 1294 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, |
1295 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, |
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, | 1296 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, |
1297 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, | ||
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, | 1298 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, |
1298 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, | 1299 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, |
1299 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, | 1300 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, |
diff --git a/drivers/hid/hid-elecom.c b/drivers/hid/hid-elecom.c new file mode 100644 index 000000000000..7a40878f46b4 --- /dev/null +++ b/drivers/hid/hid-elecom.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * HID driver for Elecom BM084 (bluetooth mouse). | ||
3 | * Removes a non-existing horizontal wheel from | ||
4 | * the HID descriptor. | ||
5 | * (This module is based on "hid-ortek".) | ||
6 | * | ||
7 | * Copyright (c) 2010 Richard Nauber <Richard.Nauber@gmail.com> | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the Free | ||
13 | * Software Foundation; either version 2 of the License, or (at your option) | ||
14 | * any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/device.h> | ||
18 | #include <linux/hid.h> | ||
19 | #include <linux/module.h> | ||
20 | |||
21 | #include "hid-ids.h" | ||
22 | |||
23 | static void elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc, | ||
24 | unsigned int rsize) | ||
25 | { | ||
26 | if (rsize >= 48 && rdesc[46] == 0x05 && rdesc[47] == 0x0c) { | ||
27 | dev_info(&hdev->dev, "Fixing up Elecom BM084 " | ||
28 | "report descriptor.\n"); | ||
29 | rdesc[47] = 0x00; | ||
30 | } | ||
31 | } | ||
32 | |||
33 | static const struct hid_device_id elecom_devices[] = { | ||
34 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084)}, | ||
35 | { } | ||
36 | }; | ||
37 | MODULE_DEVICE_TABLE(hid, elecom_devices); | ||
38 | |||
39 | static struct hid_driver elecom_driver = { | ||
40 | .name = "elecom", | ||
41 | .id_table = elecom_devices, | ||
42 | .report_fixup = elecom_report_fixup | ||
43 | }; | ||
44 | |||
45 | static int __init elecom_init(void) | ||
46 | { | ||
47 | return hid_register_driver(&elecom_driver); | ||
48 | } | ||
49 | |||
50 | static void __exit elecom_exit(void) | ||
51 | { | ||
52 | hid_unregister_driver(&elecom_driver); | ||
53 | } | ||
54 | |||
55 | module_init(elecom_init); | ||
56 | module_exit(elecom_exit); | ||
57 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 9776896cc4fc..69778c5cd4d4 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -186,6 +186,9 @@ | |||
186 | #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 | 186 | #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 |
187 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d | 187 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d |
188 | 188 | ||
189 | #define USB_VENDOR_ID_ELECOM 0x056e | ||
190 | #define USB_DEVICE_ID_ELECOM_BM084 0x0061 | ||
191 | |||
189 | #define USB_VENDOR_ID_ELO 0x04E7 | 192 | #define USB_VENDOR_ID_ELO 0x04E7 |
190 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 | 193 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 |
191 | 194 | ||