aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR
diff options
context:
space:
mode:
authorSergey Ivanov <123kash@gmail.com>2010-08-09 09:18:32 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 05:55:55 -0400
commit111ac84a80199654db55c06e2565d4ab343c135d (patch)
treeafa365528ce77ec78ad58aff0eb80b5edd99ed2f /drivers/media/IR
parentfba39807ceba3e2aab022fa8c7181a322fe12675 (diff)
[media] Twinhan 1027 + IR Port support
Patch add support of TwinHan 1027 DVB-S card. Refreshed version of https://patchwork.kernel.org/patch/79753/ patch. (adapted for the new IR system), still works. DVB-S support come from a patch originally authored by Manu Abraham (abraham.manu@gmail.com). IR Port support were added by Sergey. Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR')
-rw-r--r--drivers/media/IR/keymaps/Makefile1
-rw-r--r--drivers/media/IR/keymaps/rc-twinhan1027.c87
2 files changed, 88 insertions, 0 deletions
diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile
index 11688dd740ca..6083453f4715 100644
--- a/drivers/media/IR/keymaps/Makefile
+++ b/drivers/media/IR/keymaps/Makefile
@@ -77,6 +77,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
77 rc-total-media-in-hand.o \ 77 rc-total-media-in-hand.o \
78 rc-trekstor.o \ 78 rc-trekstor.o \
79 rc-tt-1500.o \ 79 rc-tt-1500.o \
80 rc-twinhan1027.o \
80 rc-videomate-s350.o \ 81 rc-videomate-s350.o \
81 rc-videomate-tv-pvr.o \ 82 rc-videomate-tv-pvr.o \
82 rc-winfast.o \ 83 rc-winfast.o \
diff --git a/drivers/media/IR/keymaps/rc-twinhan1027.c b/drivers/media/IR/keymaps/rc-twinhan1027.c
new file mode 100644
index 000000000000..0b5d356c2d84
--- /dev/null
+++ b/drivers/media/IR/keymaps/rc-twinhan1027.c
@@ -0,0 +1,87 @@
1#include <media/rc-map.h>
2
3static struct ir_scancode twinhan_vp1027[] = {
4 { 0x16, KEY_POWER2 },
5 { 0x17, KEY_FAVORITES },
6 { 0x0f, KEY_TEXT },
7 { 0x48, KEY_INFO},
8 { 0x1c, KEY_EPG },
9 { 0x04, KEY_LIST },
10
11 { 0x03, KEY_1 },
12 { 0x01, KEY_2 },
13 { 0x06, KEY_3 },
14 { 0x09, KEY_4 },
15 { 0x1d, KEY_5 },
16 { 0x1f, KEY_6 },
17 { 0x0d, KEY_7 },
18 { 0x19, KEY_8 },
19 { 0x1b, KEY_9 },
20 { 0x15, KEY_0 },
21
22 { 0x0c, KEY_CANCEL },
23 { 0x4a, KEY_CLEAR },
24 { 0x13, KEY_BACKSPACE },
25 { 0x00, KEY_TAB },
26
27 { 0x4b, KEY_UP },
28 { 0x51, KEY_DOWN },
29 { 0x4e, KEY_LEFT },
30 { 0x52, KEY_RIGHT },
31 { 0x4f, KEY_ENTER },
32
33 { 0x1e, KEY_VOLUMEUP },
34 { 0x0a, KEY_VOLUMEDOWN },
35 { 0x02, KEY_CHANNELDOWN },
36 { 0x05, KEY_CHANNELUP },
37 { 0x11, KEY_RECORD },
38
39 { 0x14, KEY_PLAY },
40 { 0x4c, KEY_PAUSE },
41 { 0x1a, KEY_STOP },
42 { 0x40, KEY_REWIND },
43 { 0x12, KEY_FASTFORWARD },
44 { 0x41, KEY_PREVIOUSSONG },
45 { 0x42, KEY_NEXTSONG },
46 { 0x54, KEY_SAVE },
47 { 0x50, KEY_LANGUAGE },
48 { 0x47, KEY_MEDIA },
49 { 0x4d, KEY_SCREEN },
50 { 0x43, KEY_SUBTITLE },
51 { 0x10, KEY_MUTE },
52 { 0x49, KEY_AUDIO },
53 { 0x07, KEY_SLEEP },
54 { 0x08, KEY_VIDEO },
55 { 0x0e, KEY_AGAIN },
56 { 0x45, KEY_EQUAL },
57 { 0x46, KEY_MINUS },
58 { 0x18, KEY_RED },
59 { 0x53, KEY_GREEN },
60 { 0x5e, KEY_YELLOW },
61 { 0x5f, KEY_BLUE },
62};
63
64static struct rc_keymap twinhan_vp1027_map = {
65 .map = {
66 .scan = twinhan_vp1027,
67 .size = ARRAY_SIZE(twinhan_vp1027),
68 .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
69 .name = RC_MAP_TWINHAN_VP1027_DVBS,
70 }
71};
72
73static int __init init_rc_map_twinhan_vp1027(void)
74{
75 return ir_register_map(&twinhan_vp1027_map);
76}
77
78static void __exit exit_rc_map_twinhan_vp1027(void)
79{
80 ir_unregister_map(&twinhan_vp1027_map);
81}
82
83module_init(init_rc_map_twinhan_vp1027)
84module_exit(exit_rc_map_twinhan_vp1027)
85
86MODULE_LICENSE("GPL");
87MODULE_AUTHOR("Sergey Ivanov <123kash@gmail.com>");