xref: /OK3568_Linux_fs/kernel/drivers/media/rc/keymaps/rc-videostrong-kii-pro.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0+
2*4882a593Smuzhiyun //
3*4882a593Smuzhiyun // Copyright (C) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <media/rc-map.h>
6*4882a593Smuzhiyun #include <linux/module.h>
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun //
9*4882a593Smuzhiyun // Keytable for the Videostrong KII Pro STB remote control
10*4882a593Smuzhiyun //
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun static struct rc_map_table kii_pro[] = {
13*4882a593Smuzhiyun 	{ 0x59, KEY_POWER },
14*4882a593Smuzhiyun 	{ 0x19, KEY_MUTE },
15*4882a593Smuzhiyun 	{ 0x42, KEY_RED },
16*4882a593Smuzhiyun 	{ 0x40, KEY_GREEN },
17*4882a593Smuzhiyun 	{ 0x00, KEY_YELLOW },
18*4882a593Smuzhiyun 	{ 0x03, KEY_BLUE },
19*4882a593Smuzhiyun 	{ 0x4a, KEY_BACK },
20*4882a593Smuzhiyun 	{ 0x48, KEY_FORWARD },
21*4882a593Smuzhiyun 	{ 0x08, KEY_PREVIOUSSONG},
22*4882a593Smuzhiyun 	{ 0x0b, KEY_NEXTSONG},
23*4882a593Smuzhiyun 	{ 0x46, KEY_PLAYPAUSE },
24*4882a593Smuzhiyun 	{ 0x44, KEY_STOP },
25*4882a593Smuzhiyun 	{ 0x1f, KEY_FAVORITES},	//KEY_F5?
26*4882a593Smuzhiyun 	{ 0x04, KEY_PVR },
27*4882a593Smuzhiyun 	{ 0x4d, KEY_EPG },
28*4882a593Smuzhiyun 	{ 0x02, KEY_INFO },
29*4882a593Smuzhiyun 	{ 0x09, KEY_SUBTITLE },
30*4882a593Smuzhiyun 	{ 0x01, KEY_AUDIO },
31*4882a593Smuzhiyun 	{ 0x0d, KEY_HOMEPAGE },
32*4882a593Smuzhiyun 	{ 0x11, KEY_TV },	// DTV ?
33*4882a593Smuzhiyun 	{ 0x06, KEY_UP },
34*4882a593Smuzhiyun 	{ 0x5a, KEY_LEFT },
35*4882a593Smuzhiyun 	{ 0x1a, KEY_ENTER },	// KEY_OK ?
36*4882a593Smuzhiyun 	{ 0x1b, KEY_RIGHT },
37*4882a593Smuzhiyun 	{ 0x16, KEY_DOWN },
38*4882a593Smuzhiyun 	{ 0x45, KEY_MENU },
39*4882a593Smuzhiyun 	{ 0x05, KEY_ESC },
40*4882a593Smuzhiyun 	{ 0x13, KEY_VOLUMEUP },
41*4882a593Smuzhiyun 	{ 0x17, KEY_VOLUMEDOWN },
42*4882a593Smuzhiyun 	{ 0x58, KEY_APPSELECT },
43*4882a593Smuzhiyun 	{ 0x12, KEY_VENDOR },	// mouse
44*4882a593Smuzhiyun 	{ 0x55, KEY_PAGEUP },	// KEY_CHANNELUP ?
45*4882a593Smuzhiyun 	{ 0x15, KEY_PAGEDOWN },	// KEY_CHANNELDOWN ?
46*4882a593Smuzhiyun 	{ 0x52, KEY_1 },
47*4882a593Smuzhiyun 	{ 0x50, KEY_2 },
48*4882a593Smuzhiyun 	{ 0x10, KEY_3 },
49*4882a593Smuzhiyun 	{ 0x56, KEY_4 },
50*4882a593Smuzhiyun 	{ 0x54, KEY_5 },
51*4882a593Smuzhiyun 	{ 0x14, KEY_6 },
52*4882a593Smuzhiyun 	{ 0x4e, KEY_7 },
53*4882a593Smuzhiyun 	{ 0x4c, KEY_8 },
54*4882a593Smuzhiyun 	{ 0x0c, KEY_9 },
55*4882a593Smuzhiyun 	{ 0x18, KEY_WWW },	// KEY_F7
56*4882a593Smuzhiyun 	{ 0x0f, KEY_0 },
57*4882a593Smuzhiyun 	{ 0x51, KEY_BACKSPACE },
58*4882a593Smuzhiyun };
59*4882a593Smuzhiyun 
60*4882a593Smuzhiyun static struct rc_map_list kii_pro_map = {
61*4882a593Smuzhiyun 	.map = {
62*4882a593Smuzhiyun 		.scan     = kii_pro,
63*4882a593Smuzhiyun 		.size     = ARRAY_SIZE(kii_pro),
64*4882a593Smuzhiyun 		.rc_proto = RC_PROTO_NEC,
65*4882a593Smuzhiyun 		.name     = RC_MAP_KII_PRO,
66*4882a593Smuzhiyun 	}
67*4882a593Smuzhiyun };
68*4882a593Smuzhiyun 
init_rc_map_kii_pro(void)69*4882a593Smuzhiyun static int __init init_rc_map_kii_pro(void)
70*4882a593Smuzhiyun {
71*4882a593Smuzhiyun 	return rc_map_register(&kii_pro_map);
72*4882a593Smuzhiyun }
73*4882a593Smuzhiyun 
exit_rc_map_kii_pro(void)74*4882a593Smuzhiyun static void __exit exit_rc_map_kii_pro(void)
75*4882a593Smuzhiyun {
76*4882a593Smuzhiyun 	rc_map_unregister(&kii_pro_map);
77*4882a593Smuzhiyun }
78*4882a593Smuzhiyun 
79*4882a593Smuzhiyun module_init(init_rc_map_kii_pro)
80*4882a593Smuzhiyun module_exit(exit_rc_map_kii_pro)
81*4882a593Smuzhiyun 
82*4882a593Smuzhiyun MODULE_LICENSE("GPL");
83*4882a593Smuzhiyun MODULE_AUTHOR("Mohammad Rasim <mohammad.rasim96@gmail.com>");
84