xref: /linux/drivers/media/rc/keymaps/rc-trekstor.c (revision 7a707b89202f905bd9f9fbde326933c59a81214c)
132cf86f6SMauro Carvalho Chehab /*
232cf86f6SMauro Carvalho Chehab  * TrekStor remote controller keytable
332cf86f6SMauro Carvalho Chehab  *
432cf86f6SMauro Carvalho Chehab  * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
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  *    This program is distributed in the hope that it will be useful,
1232cf86f6SMauro Carvalho Chehab  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
1332cf86f6SMauro Carvalho Chehab  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1432cf86f6SMauro Carvalho Chehab  *    GNU General Public License for more details.
1532cf86f6SMauro Carvalho Chehab  *
1632cf86f6SMauro Carvalho Chehab  *    You should have received a copy of the GNU General Public License along
1732cf86f6SMauro Carvalho Chehab  *    with this program; if not, write to the Free Software Foundation, Inc.,
1832cf86f6SMauro Carvalho Chehab  *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1932cf86f6SMauro Carvalho Chehab  */
2032cf86f6SMauro Carvalho Chehab 
2132cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
22*7a707b89SPaul Gortmaker #include <linux/module.h>
2332cf86f6SMauro Carvalho Chehab 
2432cf86f6SMauro Carvalho Chehab /* TrekStor DVB-T USB Stick remote controller. */
2532cf86f6SMauro Carvalho Chehab /* Imported from af9015.h.
2632cf86f6SMauro Carvalho Chehab    Initial keytable was from Marc Schneider <macke@macke.org> */
272f4f58d6SMauro Carvalho Chehab static struct rc_map_table trekstor[] = {
2832cf86f6SMauro Carvalho Chehab 	{ 0x0084, KEY_0 },
2932cf86f6SMauro Carvalho Chehab 	{ 0x0085, KEY_MUTE },            /* Mute */
3032cf86f6SMauro Carvalho Chehab 	{ 0x0086, KEY_HOMEPAGE },        /* Home */
3132cf86f6SMauro Carvalho Chehab 	{ 0x0087, KEY_UP },              /* Up */
3232cf86f6SMauro Carvalho Chehab 	{ 0x0088, KEY_OK },              /* OK */
3332cf86f6SMauro Carvalho Chehab 	{ 0x0089, KEY_RIGHT },           /* Right */
3432cf86f6SMauro Carvalho Chehab 	{ 0x008a, KEY_FASTFORWARD },     /* Fast forward */
3532cf86f6SMauro Carvalho Chehab 	{ 0x008b, KEY_VOLUMEUP },        /* Volume + */
3632cf86f6SMauro Carvalho Chehab 	{ 0x008c, KEY_DOWN },            /* Down */
3732cf86f6SMauro Carvalho Chehab 	{ 0x008d, KEY_PLAY },            /* Play/Pause */
3832cf86f6SMauro Carvalho Chehab 	{ 0x008e, KEY_STOP },            /* Stop */
3932cf86f6SMauro Carvalho Chehab 	{ 0x008f, KEY_EPG },             /* Info/EPG */
4032cf86f6SMauro Carvalho Chehab 	{ 0x0090, KEY_7 },
4132cf86f6SMauro Carvalho Chehab 	{ 0x0091, KEY_4 },
4232cf86f6SMauro Carvalho Chehab 	{ 0x0092, KEY_1 },
4332cf86f6SMauro Carvalho Chehab 	{ 0x0093, KEY_CHANNELDOWN },     /* Channel - */
4432cf86f6SMauro Carvalho Chehab 	{ 0x0094, KEY_8 },
4532cf86f6SMauro Carvalho Chehab 	{ 0x0095, KEY_5 },
4632cf86f6SMauro Carvalho Chehab 	{ 0x0096, KEY_2 },
4732cf86f6SMauro Carvalho Chehab 	{ 0x0097, KEY_CHANNELUP },       /* Channel + */
4832cf86f6SMauro Carvalho Chehab 	{ 0x0098, KEY_9 },
4932cf86f6SMauro Carvalho Chehab 	{ 0x0099, KEY_6 },
5032cf86f6SMauro Carvalho Chehab 	{ 0x009a, KEY_3 },
5132cf86f6SMauro Carvalho Chehab 	{ 0x009b, KEY_VOLUMEDOWN },      /* Volume - */
5232cf86f6SMauro Carvalho Chehab 	{ 0x009c, KEY_TV },              /* TV */
5332cf86f6SMauro Carvalho Chehab 	{ 0x009d, KEY_RECORD },          /* Record */
5432cf86f6SMauro Carvalho Chehab 	{ 0x009e, KEY_REWIND },          /* Rewind */
5532cf86f6SMauro Carvalho Chehab 	{ 0x009f, KEY_LEFT },            /* Left */
5632cf86f6SMauro Carvalho Chehab };
5732cf86f6SMauro Carvalho Chehab 
58d100e659SMauro Carvalho Chehab static struct rc_map_list trekstor_map = {
5932cf86f6SMauro Carvalho Chehab 	.map = {
6032cf86f6SMauro Carvalho Chehab 		.scan    = trekstor,
6132cf86f6SMauro Carvalho Chehab 		.size    = ARRAY_SIZE(trekstor),
6252b66144SMauro Carvalho Chehab 		.rc_type = RC_TYPE_NEC,
6332cf86f6SMauro Carvalho Chehab 		.name    = RC_MAP_TREKSTOR,
6432cf86f6SMauro Carvalho Chehab 	}
6532cf86f6SMauro Carvalho Chehab };
6632cf86f6SMauro Carvalho Chehab 
6732cf86f6SMauro Carvalho Chehab static int __init init_rc_map_trekstor(void)
6832cf86f6SMauro Carvalho Chehab {
69d100e659SMauro Carvalho Chehab 	return rc_map_register(&trekstor_map);
7032cf86f6SMauro Carvalho Chehab }
7132cf86f6SMauro Carvalho Chehab 
7232cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_trekstor(void)
7332cf86f6SMauro Carvalho Chehab {
74d100e659SMauro Carvalho Chehab 	rc_map_unregister(&trekstor_map);
7532cf86f6SMauro Carvalho Chehab }
7632cf86f6SMauro Carvalho Chehab 
7732cf86f6SMauro Carvalho Chehab module_init(init_rc_map_trekstor)
7832cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_trekstor)
7932cf86f6SMauro Carvalho Chehab 
8032cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
8132cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
82