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 Tronsmart Vega S9x remote control
10//
11
12static struct rc_map_table vega_s9x[] = {
13	{ 0x18, KEY_POWER },
14	{ 0x17, KEY_MUTE }, // mouse
15
16	{ 0x46, KEY_UP },
17	{ 0x47, KEY_LEFT },
18	{ 0x55, KEY_OK },
19	{ 0x15, KEY_RIGHT },
20	{ 0x16, KEY_DOWN },
21
22	{ 0x06, KEY_HOME },
23	{ 0x42, KEY_PLAYPAUSE},
24	{ 0x40, KEY_BACK },
25
26	{ 0x14, KEY_VOLUMEDOWN },
27	{ 0x04, KEY_MENU },
28	{ 0x10, KEY_VOLUMEUP },
29};
30
31static struct rc_map_list vega_s9x_map = {
32	.map = {
33		.scan     = vega_s9x,
34		.size     = ARRAY_SIZE(vega_s9x),
35		.rc_proto = RC_PROTO_NEC,
36		.name     = RC_MAP_VEGA_S9X,
37	}
38};
39
40static int __init init_rc_map_vega_s9x(void)
41{
42	return rc_map_register(&vega_s9x_map);
43}
44
45static void __exit exit_rc_map_vega_s9x(void)
46{
47	rc_map_unregister(&vega_s9x_map);
48}
49
50module_init(init_rc_map_vega_s9x)
51module_exit(exit_rc_map_vega_s9x)
52
53MODULE_LICENSE("GPL");
54MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
55MODULE_DESCRIPTION("Tronsmart Vega S9x remote controller keytable");
56