blob: 4aa1b54bb52e6a91c4756a1307e544ff27bf2509 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/*
2 * Keytable for the GeekBox remote controller
3 *
4 * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
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
17static struct rc_map_table geekbox[] = {
18 { 0x01, KEY_BACK },
19 { 0x02, KEY_DOWN },
20 { 0x03, KEY_UP },
21 { 0x07, KEY_OK },
22 { 0x0b, KEY_VOLUMEUP },
23 { 0x0e, KEY_LEFT },
24 { 0x13, KEY_MENU },
25 { 0x14, KEY_POWER },
26 { 0x1a, KEY_RIGHT },
27 { 0x48, KEY_HOME },
28 { 0x58, KEY_VOLUMEDOWN },
29 { 0x5c, KEY_SCREEN },
30};
31
32static struct rc_map_list geekbox_map = {
33 .map = {
34 .scan = geekbox,
35 .size = ARRAY_SIZE(geekbox),
36 .rc_proto = RC_PROTO_NEC,
37 .name = RC_MAP_GEEKBOX,
38 }
39};
40
41static int __init init_rc_map_geekbox(void)
42{
43 return rc_map_register(&geekbox_map);
44}
45
46static void __exit exit_rc_map_geekbox(void)
47{
48 rc_map_unregister(&geekbox_map);
49}
50
51module_init(init_rc_map_geekbox)
52module_exit(exit_rc_map_geekbox)
53
54MODULE_LICENSE("GPL");
55MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");