diff options
Diffstat (limited to 'drivers/hid/hid-topseed.c')
-rw-r--r-- | drivers/hid/hid-topseed.c | 38 |
1 files changed, 24 insertions, 14 deletions
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); |