diff options
author | Wayne Thomas <waynethomas69@gmail.com> | 2010-04-28 18:45:01 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-04-28 18:45:01 -0400 |
commit | bf280628fca93c4c341587ec914863dcc395af72 (patch) | |
tree | a09632bb03d3774b27bd133236979801f8dd1d14 /drivers | |
parent | 15d8ee9a96e5019e698ad3c2c181970deb8ff888 (diff) |
HID: add support for BTC Emprex 3009URF III Vista MCE Remote
The Behavior Tech. Computer Corp. (BTC) remote branded as "Emprex 3009URF III
Vista Remote Controller" uses non-standard mappings for all of its 'special
purpose' keys (0xffbc usage page). This patch modifies the existing
hid-topseed quirky driver to support both remotes in order to prevent
proliferation of in-kernel quirky drivers until such a time that udev remapping
works with these devices. Tested successfully with both the "Emprex" remote
and the "CyberLink" remote originally supported by the hid-topseed driver.
Signed-off-by: Wayne Thomas <waynethomas69@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 3 | ||||
-rw-r--r-- | drivers/hid/hid-topseed.c | 38 |
4 files changed, 29 insertions, 15 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 8e1b505b5bf2..631ede69c012 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -332,7 +332,7 @@ config HID_TOPSEED | |||
332 | depends on USB_HID | 332 | depends on USB_HID |
333 | default !EMBEDDED | 333 | default !EMBEDDED |
334 | ---help--- | 334 | ---help--- |
335 | Say Y if you have a TopSeed Cyberlink remote control. | 335 | Say Y if you have a TopSeed Cyberlink or BTC Emprex remote control. |
336 | 336 | ||
337 | config HID_THRUSTMASTER | 337 | config HID_THRUSTMASTER |
338 | tristate "ThrustMaster devices support" if EMBEDDED | 338 | tristate "ThrustMaster devices support" if EMBEDDED |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 34429d7d89af..b9f99f9c4b2f 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_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, | 1294 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, |
1295 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, |
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, | 1296 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, |
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) }, | ||
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, | 1298 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, |
1298 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, | 1299 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, |
1299 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, | 1300 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 0786bbdafb4a..9791d0a8d16d 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -124,6 +124,9 @@ | |||
124 | #define USB_VENDOR_ID_BERKSHIRE 0x0c98 | 124 | #define USB_VENDOR_ID_BERKSHIRE 0x0c98 |
125 | #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 | 125 | #define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140 |
126 | 126 | ||
127 | #define USB_VENDOR_ID_BTC 0x046e | ||
128 | #define USB_DEVICE_ID_BTC_EMPREX_REMOTE 0x5578 | ||
129 | |||
127 | #define USB_VENDOR_ID_CH 0x068e | 130 | #define USB_VENDOR_ID_CH 0x068e |
128 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 | 131 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 |
129 | #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 | 132 | #define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 |
diff --git a/drivers/hid/hid-topseed.c b/drivers/hid/hid-topseed.c index 6925eda1081a..2eebdcc57bcf 100644 --- a/drivers/hid/hid-topseed.c +++ b/drivers/hid/hid-topseed.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2008 Lev Babiev | 4 | * Copyright (c) 2008 Lev Babiev |
5 | * based on hid-cherry driver | 5 | * based on hid-cherry driver |
6 | * | ||
7 | * Modified to also support BTC "Emprex 3009URF III Vista MCE Remote" by | ||
8 | * Wayne Thomas 2010. | ||
6 | */ | 9 | */ |
7 | 10 | ||
8 | /* | 11 | /* |
@@ -24,23 +27,29 @@ static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
24 | struct hid_field *field, struct hid_usage *usage, | 27 | struct hid_field *field, struct hid_usage *usage, |
25 | unsigned long **bit, int *max) | 28 | unsigned long **bit, int *max) |
26 | { | 29 | { |
27 | if ((usage->hid & HID_USAGE_PAGE) != 0x0ffbc0000) | 30 | if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) |
28 | return 0; | 31 | return 0; |
29 | 32 | ||
30 | switch (usage->hid & HID_USAGE) { | 33 | switch (usage->hid & HID_USAGE) { |
31 | case 0x00d: ts_map_key_clear(KEY_HOME); break; | 34 | case 0x00d: ts_map_key_clear(KEY_MEDIA); break; |
32 | case 0x024: ts_map_key_clear(KEY_MENU); break; | 35 | case 0x024: ts_map_key_clear(KEY_MENU); break; |
33 | case 0x025: ts_map_key_clear(KEY_TV); break; | 36 | case 0x025: ts_map_key_clear(KEY_TV); break; |
34 | case 0x048: ts_map_key_clear(KEY_RED); break; | 37 | case 0x031: ts_map_key_clear(KEY_AUDIO); break; |
35 | case 0x047: ts_map_key_clear(KEY_GREEN); break; | 38 | case 0x032: ts_map_key_clear(KEY_TEXT); break; |
36 | case 0x049: ts_map_key_clear(KEY_YELLOW); break; | 39 | case 0x033: ts_map_key_clear(KEY_CHANNEL); break; |
37 | case 0x04a: ts_map_key_clear(KEY_BLUE); break; | 40 | case 0x047: ts_map_key_clear(KEY_MP3); break; |
38 | case 0x04b: ts_map_key_clear(KEY_ANGLE); break; | 41 | case 0x048: ts_map_key_clear(KEY_TV2); break; |
39 | case 0x04c: ts_map_key_clear(KEY_LANGUAGE); break; | 42 | case 0x049: ts_map_key_clear(KEY_CAMERA); break; |
40 | case 0x04d: ts_map_key_clear(KEY_SUBTITLE); break; | 43 | case 0x04a: ts_map_key_clear(KEY_VIDEO); break; |
41 | case 0x031: ts_map_key_clear(KEY_AUDIO); break; | 44 | case 0x04b: ts_map_key_clear(KEY_ANGLE); break; |
42 | case 0x032: ts_map_key_clear(KEY_TEXT); break; | 45 | case 0x04c: ts_map_key_clear(KEY_LANGUAGE); break; |
43 | case 0x033: ts_map_key_clear(KEY_CHANNEL); break; | 46 | case 0x04d: ts_map_key_clear(KEY_SUBTITLE); break; |
47 | case 0x050: ts_map_key_clear(KEY_RADIO); break; | ||
48 | case 0x05a: ts_map_key_clear(KEY_TEXT); break; | ||
49 | case 0x05b: ts_map_key_clear(KEY_RED); break; | ||
50 | case 0x05c: ts_map_key_clear(KEY_GREEN); break; | ||
51 | case 0x05d: ts_map_key_clear(KEY_YELLOW); break; | ||
52 | case 0x05e: ts_map_key_clear(KEY_BLUE); break; | ||
44 | default: | 53 | default: |
45 | return 0; | 54 | return 0; |
46 | } | 55 | } |
@@ -50,6 +59,7 @@ static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
50 | 59 | ||
51 | static const struct hid_device_id ts_devices[] = { | 60 | static const struct hid_device_id ts_devices[] = { |
52 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, | 61 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, |
62 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) }, | ||
53 | { } | 63 | { } |
54 | }; | 64 | }; |
55 | MODULE_DEVICE_TABLE(hid, ts_devices); | 65 | MODULE_DEVICE_TABLE(hid, ts_devices); |