diff options
-rw-r--r-- | drivers/media/IR/keymaps/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/IR/keymaps/rc-leadtek-y04g0051.c | 99 | ||||
-rw-r--r-- | include/media/rc-map.h | 1 |
3 files changed, 101 insertions, 0 deletions
diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index 743a57f85ac3..c5436637ffde 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile | |||
@@ -40,6 +40,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | |||
40 | rc-kaiomy.o \ | 40 | rc-kaiomy.o \ |
41 | rc-kworld-315u.o \ | 41 | rc-kworld-315u.o \ |
42 | rc-kworld-plus-tv-analog.o \ | 42 | rc-kworld-plus-tv-analog.o \ |
43 | rc-leadtek-y04g0051.o \ | ||
43 | rc-lirc.o \ | 44 | rc-lirc.o \ |
44 | rc-lme2510.o \ | 45 | rc-lme2510.o \ |
45 | rc-manli.o \ | 46 | rc-manli.o \ |
diff --git a/drivers/media/IR/keymaps/rc-leadtek-y04g0051.c b/drivers/media/IR/keymaps/rc-leadtek-y04g0051.c new file mode 100644 index 000000000000..7521315fd876 --- /dev/null +++ b/drivers/media/IR/keymaps/rc-leadtek-y04g0051.c | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * LeadTek Y04G0051 remote controller keytable | ||
3 | * | ||
4 | * Copyright (C) 2010 Antti Palosaari <crope@iki.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <media/rc-map.h> | ||
22 | |||
23 | static struct ir_scancode leadtek_y04g0051[] = { | ||
24 | { 0x0300, KEY_POWER2 }, | ||
25 | { 0x0303, KEY_SCREEN }, | ||
26 | { 0x0304, KEY_RIGHT }, | ||
27 | { 0x0305, KEY_1 }, | ||
28 | { 0x0306, KEY_2 }, | ||
29 | { 0x0307, KEY_3 }, | ||
30 | { 0x0308, KEY_LEFT }, | ||
31 | { 0x0309, KEY_4 }, | ||
32 | { 0x030a, KEY_5 }, | ||
33 | { 0x030b, KEY_6 }, | ||
34 | { 0x030c, KEY_UP }, | ||
35 | { 0x030d, KEY_7 }, | ||
36 | { 0x030e, KEY_8 }, | ||
37 | { 0x030f, KEY_9 }, | ||
38 | { 0x0310, KEY_DOWN }, | ||
39 | { 0x0311, KEY_AGAIN }, | ||
40 | { 0x0312, KEY_0 }, | ||
41 | { 0x0313, KEY_OK }, /* 1st ok */ | ||
42 | { 0x0314, KEY_MUTE }, | ||
43 | { 0x0316, KEY_OK }, /* 2nd ok */ | ||
44 | { 0x031e, KEY_VIDEO }, /* 2nd video */ | ||
45 | { 0x031b, KEY_AUDIO }, | ||
46 | { 0x031f, KEY_TEXT }, | ||
47 | { 0x0340, KEY_SLEEP }, | ||
48 | { 0x0341, KEY_DOT }, | ||
49 | { 0x0342, KEY_REWIND }, | ||
50 | { 0x0343, KEY_PLAY }, | ||
51 | { 0x0344, KEY_FASTFORWARD }, | ||
52 | { 0x0345, KEY_TIME }, | ||
53 | { 0x0346, KEY_STOP }, /* 2nd stop */ | ||
54 | { 0x0347, KEY_RECORD }, | ||
55 | { 0x0348, KEY_CAMERA }, | ||
56 | { 0x0349, KEY_ESC }, | ||
57 | { 0x034a, KEY_NEW }, | ||
58 | { 0x034b, KEY_RED }, | ||
59 | { 0x034c, KEY_GREEN }, | ||
60 | { 0x034d, KEY_YELLOW }, | ||
61 | { 0x034e, KEY_BLUE }, | ||
62 | { 0x034f, KEY_MENU }, | ||
63 | { 0x0350, KEY_STOP }, /* 1st stop */ | ||
64 | { 0x0351, KEY_CHANNEL }, | ||
65 | { 0x0352, KEY_VIDEO }, /* 1st video */ | ||
66 | { 0x0353, KEY_EPG }, | ||
67 | { 0x0354, KEY_PREVIOUS }, | ||
68 | { 0x0355, KEY_NEXT }, | ||
69 | { 0x0356, KEY_TV }, | ||
70 | { 0x035a, KEY_VOLUMEDOWN }, | ||
71 | { 0x035b, KEY_CHANNELUP }, | ||
72 | { 0x035e, KEY_VOLUMEUP }, | ||
73 | { 0x035f, KEY_CHANNELDOWN }, | ||
74 | }; | ||
75 | |||
76 | static struct rc_keymap leadtek_y04g0051_map = { | ||
77 | .map = { | ||
78 | .scan = leadtek_y04g0051, | ||
79 | .size = ARRAY_SIZE(leadtek_y04g0051), | ||
80 | .ir_type = IR_TYPE_NEC, | ||
81 | .name = RC_MAP_LEADTEK_Y04G0051, | ||
82 | } | ||
83 | }; | ||
84 | |||
85 | static int __init init_rc_map_leadtek_y04g0051(void) | ||
86 | { | ||
87 | return ir_register_map(&leadtek_y04g0051_map); | ||
88 | } | ||
89 | |||
90 | static void __exit exit_rc_map_leadtek_y04g0051(void) | ||
91 | { | ||
92 | ir_unregister_map(&leadtek_y04g0051_map); | ||
93 | } | ||
94 | |||
95 | module_init(init_rc_map_leadtek_y04g0051) | ||
96 | module_exit(exit_rc_map_leadtek_y04g0051) | ||
97 | |||
98 | MODULE_LICENSE("GPL"); | ||
99 | MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>"); | ||
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index db1f9885ed7b..a4c2343f7d34 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -97,6 +97,7 @@ void rc_map_init(void); | |||
97 | #define RC_MAP_KAIOMY "rc-kaiomy" | 97 | #define RC_MAP_KAIOMY "rc-kaiomy" |
98 | #define RC_MAP_KWORLD_315U "rc-kworld-315u" | 98 | #define RC_MAP_KWORLD_315U "rc-kworld-315u" |
99 | #define RC_MAP_KWORLD_PLUS_TV_ANALOG "rc-kworld-plus-tv-analog" | 99 | #define RC_MAP_KWORLD_PLUS_TV_ANALOG "rc-kworld-plus-tv-analog" |
100 | #define RC_MAP_LEADTEK_Y04G0051 "rc-leadtek-y04g0051" | ||
100 | #define RC_MAP_LIRC "rc-lirc" | 101 | #define RC_MAP_LIRC "rc-lirc" |
101 | #define RC_MAP_LME2510 "rc-lme2510" | 102 | #define RC_MAP_LME2510 "rc-lme2510" |
102 | #define RC_MAP_MANLI "rc-manli" | 103 | #define RC_MAP_MANLI "rc-manli" |