1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * TerraTec remote controller keytable
4 *
5 * Copyright (C) 2011 Martin Groszhauser <mgroszhauser@gmail.com>
6 * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
7 */
8
9 #include <media/rc-map.h>
10 #include <linux/module.h>
11
12 /*
13 * TerraTec slim remote, 6 rows, 3 columns.
14 * Keytable from Martin Groszhauser <mgroszhauser@gmail.com>
15 */
16 static struct rc_map_table terratec_slim_2[] = {
17 { 0x8001, KEY_MUTE }, /* MUTE */
18 { 0x8002, KEY_VOLUMEDOWN },
19 { 0x8003, KEY_CHANNELDOWN },
20 { 0x8004, KEY_NUMERIC_1 },
21 { 0x8005, KEY_NUMERIC_2 },
22 { 0x8006, KEY_NUMERIC_3 },
23 { 0x8007, KEY_NUMERIC_4 },
24 { 0x8008, KEY_NUMERIC_5 },
25 { 0x8009, KEY_NUMERIC_6 },
26 { 0x800a, KEY_NUMERIC_7 },
27 { 0x800c, KEY_ZOOM }, /* [fullscreen] */
28 { 0x800d, KEY_NUMERIC_0 },
29 { 0x800e, KEY_AGAIN }, /* [two arrows forming a circle] */
30 { 0x8012, KEY_POWER2 }, /* [red power button] */
31 { 0x801a, KEY_VOLUMEUP },
32 { 0x801b, KEY_NUMERIC_8 },
33 { 0x801e, KEY_CHANNELUP },
34 { 0x801f, KEY_NUMERIC_9 },
35 };
36
37 static struct rc_map_list terratec_slim_2_map = {
38 .map = {
39 .scan = terratec_slim_2,
40 .size = ARRAY_SIZE(terratec_slim_2),
41 .rc_proto = RC_PROTO_NEC,
42 .name = RC_MAP_TERRATEC_SLIM_2,
43 }
44 };
45
init_rc_map_terratec_slim_2(void)46 static int __init init_rc_map_terratec_slim_2(void)
47 {
48 return rc_map_register(&terratec_slim_2_map);
49 }
50
exit_rc_map_terratec_slim_2(void)51 static void __exit exit_rc_map_terratec_slim_2(void)
52 {
53 rc_map_unregister(&terratec_slim_2_map);
54 }
55
56 module_init(init_rc_map_terratec_slim_2)
57 module_exit(exit_rc_map_terratec_slim_2)
58
59 MODULE_LICENSE("GPL");
60 MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
61 MODULE_DESCRIPTION("TerraTec slim remote controller keytable");
62