blob: 11735ad36c6aa9cf8d3a6801b9aa5c6149132804 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-only
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Keytable for the GeekBox remote controller
4 *
5 * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006 */
7
8#include <media/rc-map.h>
9#include <linux/module.h>
10
11static struct rc_map_table geekbox[] = {
12 { 0x01, KEY_BACK },
13 { 0x02, KEY_DOWN },
14 { 0x03, KEY_UP },
15 { 0x07, KEY_OK },
16 { 0x0b, KEY_VOLUMEUP },
17 { 0x0e, KEY_LEFT },
18 { 0x13, KEY_MENU },
19 { 0x14, KEY_POWER },
20 { 0x1a, KEY_RIGHT },
21 { 0x48, KEY_HOME },
22 { 0x58, KEY_VOLUMEDOWN },
23 { 0x5c, KEY_SCREEN },
24};
25
26static struct rc_map_list geekbox_map = {
27 .map = {
28 .scan = geekbox,
29 .size = ARRAY_SIZE(geekbox),
30 .rc_proto = RC_PROTO_NEC,
31 .name = RC_MAP_GEEKBOX,
32 }
33};
34
35static int __init init_rc_map_geekbox(void)
36{
37 return rc_map_register(&geekbox_map);
38}
39
40static void __exit exit_rc_map_geekbox(void)
41{
42 rc_map_unregister(&geekbox_map);
43}
44
45module_init(init_rc_map_geekbox)
46module_exit(exit_rc_map_geekbox)
47
48MODULE_LICENSE("GPL");
49MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");