1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>
4 *
5 */
6
7 #include <media/rc-map.h>
8 #include <linux/module.h>
9
10 /*
11 * Keytable for the Beelink Mini MXIII remote control
12 *
13 */
14
15 static struct rc_map_table beelink_mxiii[] = {
16 { 0xb2dc, KEY_POWER },
17
18 { 0xb288, KEY_MUTE },
19 { 0xb282, KEY_HOME },
20
21 { 0xb2ca, KEY_UP },
22 { 0xb299, KEY_LEFT },
23 { 0xb2ce, KEY_OK },
24 { 0xb2c1, KEY_RIGHT },
25 { 0xb2d2, KEY_DOWN },
26
27 { 0xb2c5, KEY_MENU },
28 { 0xb29a, KEY_BACK },
29
30 { 0xb281, KEY_VOLUMEDOWN },
31 { 0xb280, KEY_VOLUMEUP },
32 };
33
34 static struct rc_map_list beelink_mxiii_map = {
35 .map = {
36 .scan = beelink_mxiii,
37 .size = ARRAY_SIZE(beelink_mxiii),
38 .rc_proto = RC_PROTO_NEC,
39 .name = RC_MAP_BEELINK_MXIII,
40 }
41 };
42
init_rc_map_beelink_mxiii(void)43 static int __init init_rc_map_beelink_mxiii(void)
44 {
45 return rc_map_register(&beelink_mxiii_map);
46 }
47
exit_rc_map_beelink_mxiii(void)48 static void __exit exit_rc_map_beelink_mxiii(void)
49 {
50 rc_map_unregister(&beelink_mxiii_map);
51 }
52
53 module_init(init_rc_map_beelink_mxiii)
54 module_exit(exit_rc_map_beelink_mxiii)
55
56 MODULE_LICENSE("GPL");
57 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
58 MODULE_DESCRIPTION("Beelink Mini MXIII remote controller keytable");
59