1 /* Keytable for Wideview WT-220U.
2  *
3  * Copyright (c) 2016 Jonathan McDowell <noodles@earth.li>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  */
10 
11 #include <media/rc-map.h>
12 #include <linux/module.h>
13 
14 /* key list for the tiny remote control (Yakumo, don't know about the others) */
15 static struct rc_map_table dtt200u_table[] = {
16 	{ 0x8001, KEY_MUTE },
17 	{ 0x8002, KEY_CHANNELDOWN },
18 	{ 0x8003, KEY_VOLUMEDOWN },
19 	{ 0x8004, KEY_1 },
20 	{ 0x8005, KEY_2 },
21 	{ 0x8006, KEY_3 },
22 	{ 0x8007, KEY_4 },
23 	{ 0x8008, KEY_5 },
24 	{ 0x8009, KEY_6 },
25 	{ 0x800a, KEY_7 },
26 	{ 0x800c, KEY_ZOOM },
27 	{ 0x800d, KEY_0 },
28 	{ 0x800e, KEY_SELECT },
29 	{ 0x8012, KEY_POWER },
30 	{ 0x801a, KEY_CHANNELUP },
31 	{ 0x801b, KEY_8 },
32 	{ 0x801e, KEY_VOLUMEUP },
33 	{ 0x801f, KEY_9 },
34 };
35 
36 static struct rc_map_list dtt200u_map = {
37 	.map = {
38 		.scan    = dtt200u_table,
39 		.size    = ARRAY_SIZE(dtt200u_table),
40 		.rc_type = RC_TYPE_NEC,
41 		.name    = RC_MAP_DTT200U,
42 	}
43 };
44 
45 static int __init init_rc_map_dtt200u(void)
46 {
47 	return rc_map_register(&dtt200u_map);
48 }
49 
50 static void __exit exit_rc_map_dtt200u(void)
51 {
52 	rc_map_unregister(&dtt200u_map);
53 }
54 
55 module_init(init_rc_map_dtt200u)
56 module_exit(exit_rc_map_dtt200u)
57 
58 MODULE_LICENSE("GPL");
59 MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>");
60