1*2a14dfafSChristian Hewitt // SPDX-License-Identifier: GPL-2.0+
2*2a14dfafSChristian Hewitt // Copyright (c) 2020 Christian Hewitt
3*2a14dfafSChristian Hewitt
4*2a14dfafSChristian Hewitt #include <media/rc-map.h>
5*2a14dfafSChristian Hewitt #include <linux/module.h>
6*2a14dfafSChristian Hewitt
7*2a14dfafSChristian Hewitt /*
8*2a14dfafSChristian Hewitt * KHAMSIN is an IR/Bluetooth RCU supplied with the SmartLabs
9*2a14dfafSChristian Hewitt * SML-5442TW DVB-S/VOD box. The RCU has separate IR (TV) and
10*2a14dfafSChristian Hewitt * BT (STB) modes. This keymap suppors the IR controls.
11*2a14dfafSChristian Hewitt */
12*2a14dfafSChristian Hewitt
13*2a14dfafSChristian Hewitt static struct rc_map_table khamsin[] = {
14*2a14dfafSChristian Hewitt { 0x70702, KEY_POWER},
15*2a14dfafSChristian Hewitt
16*2a14dfafSChristian Hewitt { 0x70701, KEY_VIDEO}, // source
17*2a14dfafSChristian Hewitt
18*2a14dfafSChristian Hewitt { 0x7076c, KEY_RED},
19*2a14dfafSChristian Hewitt { 0x70714, KEY_GREEN},
20*2a14dfafSChristian Hewitt { 0x70715, KEY_YELLOW},
21*2a14dfafSChristian Hewitt { 0x70716, KEY_BLUE},
22*2a14dfafSChristian Hewitt
23*2a14dfafSChristian Hewitt { 0x7071a, KEY_MENU},
24*2a14dfafSChristian Hewitt { 0x7074f, KEY_EPG},
25*2a14dfafSChristian Hewitt
26*2a14dfafSChristian Hewitt { 0x70760, KEY_UP },
27*2a14dfafSChristian Hewitt { 0x70761, KEY_DOWN },
28*2a14dfafSChristian Hewitt { 0x70765, KEY_LEFT },
29*2a14dfafSChristian Hewitt { 0x70762, KEY_RIGHT },
30*2a14dfafSChristian Hewitt { 0x70768, KEY_ENTER },
31*2a14dfafSChristian Hewitt
32*2a14dfafSChristian Hewitt { 0x7072d, KEY_ESC }, // back
33*2a14dfafSChristian Hewitt
34*2a14dfafSChristian Hewitt { 0x70707, KEY_VOLUMEUP },
35*2a14dfafSChristian Hewitt { 0x7070b, KEY_VOLUMEDOWN },
36*2a14dfafSChristian Hewitt { 0x7070f, KEY_MUTE },
37*2a14dfafSChristian Hewitt { 0x70712, KEY_CHANNELUP },
38*2a14dfafSChristian Hewitt { 0x70710, KEY_CHANNELDOWN },
39*2a14dfafSChristian Hewitt
40*2a14dfafSChristian Hewitt { 0x70704, KEY_1 },
41*2a14dfafSChristian Hewitt { 0x70705, KEY_2 },
42*2a14dfafSChristian Hewitt { 0x70706, KEY_3 },
43*2a14dfafSChristian Hewitt { 0x70708, KEY_4 },
44*2a14dfafSChristian Hewitt { 0x70709, KEY_5 },
45*2a14dfafSChristian Hewitt { 0x7070a, KEY_6 },
46*2a14dfafSChristian Hewitt { 0x7070c, KEY_7 },
47*2a14dfafSChristian Hewitt { 0x7070d, KEY_8 },
48*2a14dfafSChristian Hewitt { 0x7070e, KEY_9 },
49*2a14dfafSChristian Hewitt { 0x70711, KEY_0 },
50*2a14dfafSChristian Hewitt };
51*2a14dfafSChristian Hewitt
52*2a14dfafSChristian Hewitt static struct rc_map_list khamsin_map = {
53*2a14dfafSChristian Hewitt .map = {
54*2a14dfafSChristian Hewitt .scan = khamsin,
55*2a14dfafSChristian Hewitt .size = ARRAY_SIZE(khamsin),
56*2a14dfafSChristian Hewitt .rc_proto = RC_PROTO_NECX,
57*2a14dfafSChristian Hewitt .name = RC_MAP_KHAMSIN,
58*2a14dfafSChristian Hewitt }
59*2a14dfafSChristian Hewitt };
60*2a14dfafSChristian Hewitt
init_rc_map_khamsin(void)61*2a14dfafSChristian Hewitt static int __init init_rc_map_khamsin(void)
62*2a14dfafSChristian Hewitt {
63*2a14dfafSChristian Hewitt return rc_map_register(&khamsin_map);
64*2a14dfafSChristian Hewitt }
65*2a14dfafSChristian Hewitt
exit_rc_map_khamsin(void)66*2a14dfafSChristian Hewitt static void __exit exit_rc_map_khamsin(void)
67*2a14dfafSChristian Hewitt {
68*2a14dfafSChristian Hewitt rc_map_unregister(&khamsin_map);
69*2a14dfafSChristian Hewitt }
70*2a14dfafSChristian Hewitt
71*2a14dfafSChristian Hewitt module_init(init_rc_map_khamsin)
72*2a14dfafSChristian Hewitt module_exit(exit_rc_map_khamsin)
73*2a14dfafSChristian Hewitt
74*2a14dfafSChristian Hewitt MODULE_LICENSE("GPL");
75*2a14dfafSChristian Hewitt MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com>");
76