Merge branch 'for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[linux-2.6-microblaze.git] / drivers / media / rc / keymaps / rc-odroid.c
1 // SPDX-License-Identifier: GPL-2.0+
2 //
3 // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>
4
5 #include <media/rc-map.h>
6 #include <linux/module.h>
7
8 //
9 // Keytable for the HardKernel ODROID remote control
10 //
11
12 static struct rc_map_table odroid[] = {
13         { 0xb2dc, KEY_POWER },
14
15         { 0xb288, KEY_MUTE },
16         { 0xb282, KEY_HOME },
17
18         { 0xb2ca, KEY_UP },
19         { 0xb299, KEY_LEFT },
20         { 0xb2ce, KEY_OK },
21         { 0xb2c1, KEY_RIGHT },
22         { 0xb2d2, KEY_DOWN },
23
24         { 0xb2c5, KEY_MENU },
25         { 0xb29a, KEY_BACK },
26
27         { 0xb281, KEY_VOLUMEDOWN },
28         { 0xb280, KEY_VOLUMEUP },
29 };
30
31 static struct rc_map_list odroid_map = {
32         .map = {
33                 .scan     = odroid,
34                 .size     = ARRAY_SIZE(odroid),
35                 .rc_proto = RC_PROTO_NEC,
36                 .name     = RC_MAP_ODROID,
37         }
38 };
39
40 static int __init init_rc_map_odroid(void)
41 {
42         return rc_map_register(&odroid_map);
43 }
44
45 static void __exit exit_rc_map_odroid(void)
46 {
47         rc_map_unregister(&odroid_map);
48 }
49
50 module_init(init_rc_map_odroid)
51 module_exit(exit_rc_map_odroid)
52
53 MODULE_LICENSE("GPL");
54 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");