1*9b9e9e5bSChristian Hewitt // SPDX-License-Identifier: GPL-2.0+
2*9b9e9e5bSChristian Hewitt //
3*9b9e9e5bSChristian Hewitt // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>
4*9b9e9e5bSChristian Hewitt
5*9b9e9e5bSChristian Hewitt #include <media/rc-map.h>
6*9b9e9e5bSChristian Hewitt #include <linux/module.h>
7*9b9e9e5bSChristian Hewitt
8*9b9e9e5bSChristian Hewitt //
9*9b9e9e5bSChristian Hewitt // Keytable for the X96-max STB remote control
10*9b9e9e5bSChristian Hewitt //
11*9b9e9e5bSChristian Hewitt
12*9b9e9e5bSChristian Hewitt static struct rc_map_table x96max[] = {
13*9b9e9e5bSChristian Hewitt { 0x140, KEY_POWER },
14*9b9e9e5bSChristian Hewitt
15*9b9e9e5bSChristian Hewitt // ** TV CONTROL **
16*9b9e9e5bSChristian Hewitt // SET
17*9b9e9e5bSChristian Hewitt // AV/TV
18*9b9e9e5bSChristian Hewitt // POWER
19*9b9e9e5bSChristian Hewitt // VOLUME UP
20*9b9e9e5bSChristian Hewitt // VOLUME DOWN
21*9b9e9e5bSChristian Hewitt
22*9b9e9e5bSChristian Hewitt { 0x118, KEY_VOLUMEUP },
23*9b9e9e5bSChristian Hewitt { 0x110, KEY_VOLUMEDOWN },
24*9b9e9e5bSChristian Hewitt
25*9b9e9e5bSChristian Hewitt { 0x143, KEY_MUTE }, // config
26*9b9e9e5bSChristian Hewitt
27*9b9e9e5bSChristian Hewitt { 0x100, KEY_EPG }, // mouse
28*9b9e9e5bSChristian Hewitt { 0x119, KEY_BACK },
29*9b9e9e5bSChristian Hewitt
30*9b9e9e5bSChristian Hewitt { 0x116, KEY_UP },
31*9b9e9e5bSChristian Hewitt { 0x151, KEY_LEFT },
32*9b9e9e5bSChristian Hewitt { 0x150, KEY_RIGHT },
33*9b9e9e5bSChristian Hewitt { 0x11a, KEY_DOWN },
34*9b9e9e5bSChristian Hewitt { 0x113, KEY_OK },
35*9b9e9e5bSChristian Hewitt
36*9b9e9e5bSChristian Hewitt { 0x111, KEY_HOME },
37*9b9e9e5bSChristian Hewitt { 0x14c, KEY_CONTEXT_MENU },
38*9b9e9e5bSChristian Hewitt
39*9b9e9e5bSChristian Hewitt { 0x159, KEY_PREVIOUS },
40*9b9e9e5bSChristian Hewitt { 0x15a, KEY_PLAYPAUSE },
41*9b9e9e5bSChristian Hewitt { 0x158, KEY_NEXT },
42*9b9e9e5bSChristian Hewitt
43*9b9e9e5bSChristian Hewitt { 0x147, KEY_MENU }, // @ key
44*9b9e9e5bSChristian Hewitt { 0x101, KEY_NUMERIC_0 },
45*9b9e9e5bSChristian Hewitt { 0x142, KEY_BACKSPACE },
46*9b9e9e5bSChristian Hewitt
47*9b9e9e5bSChristian Hewitt { 0x14e, KEY_NUMERIC_1 },
48*9b9e9e5bSChristian Hewitt { 0x10d, KEY_NUMERIC_2 },
49*9b9e9e5bSChristian Hewitt { 0x10c, KEY_NUMERIC_3 },
50*9b9e9e5bSChristian Hewitt
51*9b9e9e5bSChristian Hewitt { 0x14a, KEY_NUMERIC_4 },
52*9b9e9e5bSChristian Hewitt { 0x109, KEY_NUMERIC_5 },
53*9b9e9e5bSChristian Hewitt { 0x108, KEY_NUMERIC_6 },
54*9b9e9e5bSChristian Hewitt
55*9b9e9e5bSChristian Hewitt { 0x146, KEY_NUMERIC_7 },
56*9b9e9e5bSChristian Hewitt { 0x105, KEY_NUMERIC_8 },
57*9b9e9e5bSChristian Hewitt { 0x104, KEY_NUMERIC_9 },
58*9b9e9e5bSChristian Hewitt };
59*9b9e9e5bSChristian Hewitt
60*9b9e9e5bSChristian Hewitt static struct rc_map_list x96max_map = {
61*9b9e9e5bSChristian Hewitt .map = {
62*9b9e9e5bSChristian Hewitt .scan = x96max,
63*9b9e9e5bSChristian Hewitt .size = ARRAY_SIZE(x96max),
64*9b9e9e5bSChristian Hewitt .rc_proto = RC_PROTO_NEC,
65*9b9e9e5bSChristian Hewitt .name = RC_MAP_X96MAX,
66*9b9e9e5bSChristian Hewitt }
67*9b9e9e5bSChristian Hewitt };
68*9b9e9e5bSChristian Hewitt
init_rc_map_x96max(void)69*9b9e9e5bSChristian Hewitt static int __init init_rc_map_x96max(void)
70*9b9e9e5bSChristian Hewitt {
71*9b9e9e5bSChristian Hewitt return rc_map_register(&x96max_map);
72*9b9e9e5bSChristian Hewitt }
73*9b9e9e5bSChristian Hewitt
exit_rc_map_x96max(void)74*9b9e9e5bSChristian Hewitt static void __exit exit_rc_map_x96max(void)
75*9b9e9e5bSChristian Hewitt {
76*9b9e9e5bSChristian Hewitt rc_map_unregister(&x96max_map);
77*9b9e9e5bSChristian Hewitt }
78*9b9e9e5bSChristian Hewitt
79*9b9e9e5bSChristian Hewitt module_init(init_rc_map_x96max)
80*9b9e9e5bSChristian Hewitt module_exit(exit_rc_map_x96max)
81*9b9e9e5bSChristian Hewitt
82*9b9e9e5bSChristian Hewitt MODULE_LICENSE("GPL");
83*9b9e9e5bSChristian Hewitt MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");
84