1 /*
2  * Keytable for the Astrometa T2hybrid remote controller
3  *
4  * Copyright (C) 2017 Oleh Kravchenko <oleg@kaa.org.ua>
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 version 2 as
8  * published by the Free Software Foundation.
9  *
10  * You should have received a copy of the GNU General Public License
11  * along with this program. If not, see <http://www.gnu.org/licenses/>.
12  */
13 
14 #include <media/rc-map.h>
15 #include <linux/module.h>
16 
17 static struct rc_map_table t2hybrid[] = {
18 	{ 0x4d, KEY_POWER2 },
19 	{ 0x54, KEY_VIDEO }, /* Source */
20 	{ 0x16, KEY_MUTE },
21 
22 	{ 0x4c, KEY_RECORD },
23 	{ 0x05, KEY_CHANNELUP },
24 	{ 0x0c, KEY_TIME}, /* Timeshift */
25 
26 	{ 0x0a, KEY_VOLUMEDOWN },
27 	{ 0x40, KEY_ZOOM }, /* Fullscreen */
28 	{ 0x1e, KEY_VOLUMEUP },
29 
30 	{ 0x12, KEY_0 },
31 	{ 0x02, KEY_CHANNELDOWN },
32 	{ 0x1c, KEY_AGAIN }, /* Recall */
33 
34 	{ 0x09, KEY_1 },
35 	{ 0x1d, KEY_2 },
36 	{ 0x1f, KEY_3 },
37 
38 	{ 0x0d, KEY_4 },
39 	{ 0x19, KEY_5 },
40 	{ 0x1b, KEY_6 },
41 
42 	{ 0x11, KEY_7 },
43 	{ 0x15, KEY_8 },
44 	{ 0x17, KEY_9 },
45 };
46 
47 static struct rc_map_list t2hybrid_map = {
48 	.map = {
49 		.scan     = t2hybrid,
50 		.size     = ARRAY_SIZE(t2hybrid),
51 		.rc_proto = RC_PROTO_NEC,
52 		.name     = RC_MAP_ASTROMETA_T2HYBRID,
53 	}
54 };
55 
56 static int __init init_rc_map_t2hybrid(void)
57 {
58 	return rc_map_register(&t2hybrid_map);
59 }
60 
61 static void __exit exit_rc_map_t2hybrid(void)
62 {
63 	rc_map_unregister(&t2hybrid_map);
64 }
65 
66 module_init(init_rc_map_t2hybrid)
67 module_exit(exit_rc_map_t2hybrid)
68 
69 MODULE_LICENSE("GPL");
70 MODULE_AUTHOR("Oleh Kravchenko <oleg@kaa.org.ua>");
71