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
12static 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
31static 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
40static int __init init_rc_map_odroid(void)
41{
42	return rc_map_register(&odroid_map);
43}
44
45static void __exit exit_rc_map_odroid(void)
46{
47	rc_map_unregister(&odroid_map);
48}
49
50module_init(init_rc_map_odroid)
51module_exit(exit_rc_map_odroid)
52
53MODULE_LICENSE("GPL");
54MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
55MODULE_DESCRIPTION("HardKernel ODROID remote controller keytable");
56