1 // SPDX-License-Identifier: GPL-2.0+
2 // gadmei-rm008z.h - Keytable for gadmei_rm008z Remote Controller
3 //
4 // keymap imported from ir-keymaps.c
5 //
6 // Copyright (c) 2010 by Mauro Carvalho Chehab
7
8 #include <media/rc-map.h>
9 #include <linux/module.h>
10
11 /* GADMEI UTV330+ RM008Z remote
12 Shine Liu <shinel@foxmail.com>
13 */
14
15 static struct rc_map_table gadmei_rm008z[] = {
16 { 0x14, KEY_POWER2}, /* POWER OFF */
17 { 0x0c, KEY_MUTE}, /* MUTE */
18
19 { 0x18, KEY_TV}, /* TV */
20 { 0x0e, KEY_VIDEO}, /* AV */
21 { 0x0b, KEY_AUDIO}, /* SV */
22 { 0x0f, KEY_RADIO}, /* FM */
23
24 { 0x00, KEY_NUMERIC_1},
25 { 0x01, KEY_NUMERIC_2},
26 { 0x02, KEY_NUMERIC_3},
27 { 0x03, KEY_NUMERIC_4},
28 { 0x04, KEY_NUMERIC_5},
29 { 0x05, KEY_NUMERIC_6},
30 { 0x06, KEY_NUMERIC_7},
31 { 0x07, KEY_NUMERIC_8},
32 { 0x08, KEY_NUMERIC_9},
33 { 0x09, KEY_NUMERIC_0},
34 { 0x0a, KEY_INFO}, /* OSD */
35 { 0x1c, KEY_BACKSPACE}, /* LAST */
36
37 { 0x0d, KEY_PLAY}, /* PLAY */
38 { 0x1e, KEY_CAMERA}, /* SNAPSHOT */
39 { 0x1a, KEY_RECORD}, /* RECORD */
40 { 0x17, KEY_STOP}, /* STOP */
41
42 { 0x1f, KEY_UP}, /* UP */
43 { 0x44, KEY_DOWN}, /* DOWN */
44 { 0x46, KEY_TAB}, /* BACK */
45 { 0x4a, KEY_ZOOM}, /* FULLSECREEN */
46
47 { 0x10, KEY_VOLUMEUP}, /* VOLUMEUP */
48 { 0x11, KEY_VOLUMEDOWN}, /* VOLUMEDOWN */
49 { 0x12, KEY_CHANNELUP}, /* CHANNELUP */
50 { 0x13, KEY_CHANNELDOWN}, /* CHANNELDOWN */
51 { 0x15, KEY_ENTER}, /* OK */
52 };
53
54 static struct rc_map_list gadmei_rm008z_map = {
55 .map = {
56 .scan = gadmei_rm008z,
57 .size = ARRAY_SIZE(gadmei_rm008z),
58 .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
59 .name = RC_MAP_GADMEI_RM008Z,
60 }
61 };
62
init_rc_map_gadmei_rm008z(void)63 static int __init init_rc_map_gadmei_rm008z(void)
64 {
65 return rc_map_register(&gadmei_rm008z_map);
66 }
67
exit_rc_map_gadmei_rm008z(void)68 static void __exit exit_rc_map_gadmei_rm008z(void)
69 {
70 rc_map_unregister(&gadmei_rm008z_map);
71 }
72
73 module_init(init_rc_map_gadmei_rm008z)
74 module_exit(exit_rc_map_gadmei_rm008z)
75
76 MODULE_LICENSE("GPL");
77 MODULE_AUTHOR("Mauro Carvalho Chehab");
78 MODULE_DESCRIPTION("GADMEI UTV330+ RM008Z remote controller keytable");
79