xref: /linux/drivers/media/rc/keymaps/rc-lme2510.c (revision 4a1cba5151ccddf4a7071fe4950fb699e8b23bf9)
132cf86f6SMauro Carvalho Chehab /* LME2510 remote control
232cf86f6SMauro Carvalho Chehab  *
332cf86f6SMauro Carvalho Chehab  *
432cf86f6SMauro Carvalho Chehab  * Copyright (C) 2010 Malcolm Priestley (tvboxspy@gmail.com)
532cf86f6SMauro Carvalho Chehab  *
632cf86f6SMauro Carvalho Chehab  * This program is free software; you can redistribute it and/or modify
732cf86f6SMauro Carvalho Chehab  * it under the terms of the GNU General Public License as published by
832cf86f6SMauro Carvalho Chehab  * the Free Software Foundation; either version 2 of the License, or
932cf86f6SMauro Carvalho Chehab  * (at your option) any later version.
1032cf86f6SMauro Carvalho Chehab  */
1132cf86f6SMauro Carvalho Chehab 
1232cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
1332cf86f6SMauro Carvalho Chehab 
1432cf86f6SMauro Carvalho Chehab 
152f4f58d6SMauro Carvalho Chehab static struct rc_map_table lme2510_rc[] = {
16*4a1cba51SMalcolm Priestley 	/* Type 1 - 26 buttons */
17*4a1cba51SMalcolm Priestley 	{ 0xef12ba45, KEY_0 },
18*4a1cba51SMalcolm Priestley 	{ 0xef12a05f, KEY_1 },
19*4a1cba51SMalcolm Priestley 	{ 0xef12af50, KEY_2 },
20*4a1cba51SMalcolm Priestley 	{ 0xef12a25d, KEY_3 },
21*4a1cba51SMalcolm Priestley 	{ 0xef12be41, KEY_4 },
22*4a1cba51SMalcolm Priestley 	{ 0xef12f50a, KEY_5 },
23*4a1cba51SMalcolm Priestley 	{ 0xef12bd42, KEY_6 },
24*4a1cba51SMalcolm Priestley 	{ 0xef12b847, KEY_7 },
25*4a1cba51SMalcolm Priestley 	{ 0xef12b649, KEY_8 },
26*4a1cba51SMalcolm Priestley 	{ 0xef12fa05, KEY_9 },
27*4a1cba51SMalcolm Priestley 	{ 0xef12bc43, KEY_POWER },
28*4a1cba51SMalcolm Priestley 	{ 0xef12b946, KEY_SUBTITLE },
29*4a1cba51SMalcolm Priestley 	{ 0xef12f906, KEY_PAUSE },
30*4a1cba51SMalcolm Priestley 	{ 0xef12fc03, KEY_MEDIA_REPEAT},
31*4a1cba51SMalcolm Priestley 	{ 0xef12fd02, KEY_PAUSE },
32*4a1cba51SMalcolm Priestley 	{ 0xef12a15e, KEY_VOLUMEUP },
33*4a1cba51SMalcolm Priestley 	{ 0xef12a35c, KEY_VOLUMEDOWN },
34*4a1cba51SMalcolm Priestley 	{ 0xef12f609, KEY_CHANNELUP },
35*4a1cba51SMalcolm Priestley 	{ 0xef12e51a, KEY_CHANNELDOWN },
36*4a1cba51SMalcolm Priestley 	{ 0xef12e11e, KEY_PLAY },
37*4a1cba51SMalcolm Priestley 	{ 0xef12e41b, KEY_ZOOM },
38*4a1cba51SMalcolm Priestley 	{ 0xef12a659, KEY_MUTE },
39*4a1cba51SMalcolm Priestley 	{ 0xef12a55a, KEY_TV },
40*4a1cba51SMalcolm Priestley 	{ 0xef12e718, KEY_RECORD },
41*4a1cba51SMalcolm Priestley 	{ 0xef12f807, KEY_EPG },
42*4a1cba51SMalcolm Priestley 	{ 0xef12fe01, KEY_STOP },
43*4a1cba51SMalcolm Priestley 	/* Type 2 - 20 buttons */
44*4a1cba51SMalcolm Priestley 	{ 0xff40ea15, KEY_0 },
45*4a1cba51SMalcolm Priestley 	{ 0xff40f708, KEY_1 },
46*4a1cba51SMalcolm Priestley 	{ 0xff40f609, KEY_2 },
47*4a1cba51SMalcolm Priestley 	{ 0xff40f50a, KEY_3 },
48*4a1cba51SMalcolm Priestley 	{ 0xff40f30c, KEY_4 },
49*4a1cba51SMalcolm Priestley 	{ 0xff40f20d, KEY_5 },
50*4a1cba51SMalcolm Priestley 	{ 0xff40f10e, KEY_6 },
51*4a1cba51SMalcolm Priestley 	{ 0xff40ef10, KEY_7 },
52*4a1cba51SMalcolm Priestley 	{ 0xff40ee11, KEY_8 },
53*4a1cba51SMalcolm Priestley 	{ 0xff40ed12, KEY_9 },
54*4a1cba51SMalcolm Priestley 	{ 0xff40ff00, KEY_POWER },
55*4a1cba51SMalcolm Priestley 	{ 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */
56*4a1cba51SMalcolm Priestley 	{ 0xff40e51a, KEY_PAUSE }, /* Timeshift */
57*4a1cba51SMalcolm Priestley 	{ 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
58*4a1cba51SMalcolm Priestley 	{ 0xff40f906, KEY_VOLUMEDOWN }, /* Volumne defined as right hand*/
59*4a1cba51SMalcolm Priestley 	{ 0xff40fe01, KEY_CHANNELUP },
60*4a1cba51SMalcolm Priestley 	{ 0xff40fa05, KEY_CHANNELDOWN },
61*4a1cba51SMalcolm Priestley 	{ 0xff40eb14, KEY_ZOOM },
62*4a1cba51SMalcolm Priestley 	{ 0xff40e718, KEY_RECORD },
63*4a1cba51SMalcolm Priestley 	{ 0xff40e916, KEY_STOP },
64*4a1cba51SMalcolm Priestley 	/* Type 3 - 20 buttons */
65*4a1cba51SMalcolm Priestley 	{ 0xff00e31c, KEY_0 },
66*4a1cba51SMalcolm Priestley 	{ 0xff00f807, KEY_1 },
67*4a1cba51SMalcolm Priestley 	{ 0xff00ea15, KEY_2 },
68*4a1cba51SMalcolm Priestley 	{ 0xff00f609, KEY_3 },
69*4a1cba51SMalcolm Priestley 	{ 0xff00e916, KEY_4 },
70*4a1cba51SMalcolm Priestley 	{ 0xff00e619, KEY_5 },
71*4a1cba51SMalcolm Priestley 	{ 0xff00f20d, KEY_6 },
72*4a1cba51SMalcolm Priestley 	{ 0xff00f30c, KEY_7 },
73*4a1cba51SMalcolm Priestley 	{ 0xff00e718, KEY_8 },
74*4a1cba51SMalcolm Priestley 	{ 0xff00a15e, KEY_9 },
75*4a1cba51SMalcolm Priestley 	{ 0xff00ba45, KEY_POWER },
76*4a1cba51SMalcolm Priestley 	{ 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */
77*4a1cba51SMalcolm Priestley 	{ 0xff00b54a, KEY_PAUSE }, /* Timeshift */
78*4a1cba51SMalcolm Priestley 	{ 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
79*4a1cba51SMalcolm Priestley 	{ 0xff00bc43, KEY_VOLUMEDOWN }, /* Volumne defined as right hand*/
80*4a1cba51SMalcolm Priestley 	{ 0xff00b946, KEY_CHANNELUP },
81*4a1cba51SMalcolm Priestley 	{ 0xff00bf40, KEY_CHANNELDOWN },
82*4a1cba51SMalcolm Priestley 	{ 0xff00f708, KEY_ZOOM },
83*4a1cba51SMalcolm Priestley 	{ 0xff00bd42, KEY_RECORD },
84*4a1cba51SMalcolm Priestley 	{ 0xff00a55a, KEY_STOP },
8532cf86f6SMauro Carvalho Chehab };
8632cf86f6SMauro Carvalho Chehab 
87d100e659SMauro Carvalho Chehab static struct rc_map_list lme2510_map = {
8832cf86f6SMauro Carvalho Chehab 	.map = {
8932cf86f6SMauro Carvalho Chehab 		.scan    = lme2510_rc,
9032cf86f6SMauro Carvalho Chehab 		.size    = ARRAY_SIZE(lme2510_rc),
9152b66144SMauro Carvalho Chehab 		.rc_type = RC_TYPE_UNKNOWN,
9232cf86f6SMauro Carvalho Chehab 		.name    = RC_MAP_LME2510,
9332cf86f6SMauro Carvalho Chehab 	}
9432cf86f6SMauro Carvalho Chehab };
9532cf86f6SMauro Carvalho Chehab 
9632cf86f6SMauro Carvalho Chehab static int __init init_rc_lme2510_map(void)
9732cf86f6SMauro Carvalho Chehab {
98d100e659SMauro Carvalho Chehab 	return rc_map_register(&lme2510_map);
9932cf86f6SMauro Carvalho Chehab }
10032cf86f6SMauro Carvalho Chehab 
10132cf86f6SMauro Carvalho Chehab static void __exit exit_rc_lme2510_map(void)
10232cf86f6SMauro Carvalho Chehab {
103d100e659SMauro Carvalho Chehab 	rc_map_unregister(&lme2510_map);
10432cf86f6SMauro Carvalho Chehab }
10532cf86f6SMauro Carvalho Chehab 
10632cf86f6SMauro Carvalho Chehab module_init(init_rc_lme2510_map)
10732cf86f6SMauro Carvalho Chehab module_exit(exit_rc_lme2510_map)
10832cf86f6SMauro Carvalho Chehab 
10932cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
11032cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");
111