xref: /linux/drivers/media/rc/keymaps/rc-digittrade.c (revision 16216333235adf51093d0330a934a7e4a03134fe)
1*16216333SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
232cf86f6SMauro Carvalho Chehab /*
332cf86f6SMauro Carvalho Chehab  * Digittrade DVB-T USB Stick remote controller keytable
432cf86f6SMauro Carvalho Chehab  *
532cf86f6SMauro Carvalho Chehab  * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
632cf86f6SMauro Carvalho Chehab  */
732cf86f6SMauro Carvalho Chehab 
832cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
97a707b89SPaul Gortmaker #include <linux/module.h>
1032cf86f6SMauro Carvalho Chehab 
1132cf86f6SMauro Carvalho Chehab /* Digittrade DVB-T USB Stick remote controller. */
1232cf86f6SMauro Carvalho Chehab /* Imported from af9015.h.
1332cf86f6SMauro Carvalho Chehab    Initial keytable was from Alain Kalker <miki@dds.nl> */
1432cf86f6SMauro Carvalho Chehab 
1532cf86f6SMauro Carvalho Chehab /* Digittrade DVB-T USB Stick */
162f4f58d6SMauro Carvalho Chehab static struct rc_map_table digittrade[] = {
1732cf86f6SMauro Carvalho Chehab 	{ 0x0000, KEY_9 },
1832cf86f6SMauro Carvalho Chehab 	{ 0x0001, KEY_EPG },             /* EPG */
1932cf86f6SMauro Carvalho Chehab 	{ 0x0002, KEY_VOLUMEDOWN },      /* Vol Dn */
2032cf86f6SMauro Carvalho Chehab 	{ 0x0003, KEY_TEXT },            /* TELETEXT */
2132cf86f6SMauro Carvalho Chehab 	{ 0x0004, KEY_8 },
2232cf86f6SMauro Carvalho Chehab 	{ 0x0005, KEY_MUTE },            /* MUTE */
2332cf86f6SMauro Carvalho Chehab 	{ 0x0006, KEY_POWER2 },          /* POWER */
2432cf86f6SMauro Carvalho Chehab 	{ 0x0009, KEY_ZOOM },            /* FULLSCREEN */
2532cf86f6SMauro Carvalho Chehab 	{ 0x000a, KEY_RECORD },          /* RECORD */
2632cf86f6SMauro Carvalho Chehab 	{ 0x000d, KEY_SUBTITLE },        /* SUBTITLE */
2732cf86f6SMauro Carvalho Chehab 	{ 0x000e, KEY_STOP },            /* STOP */
2832cf86f6SMauro Carvalho Chehab 	{ 0x0010, KEY_OK },              /* RETURN */
2932cf86f6SMauro Carvalho Chehab 	{ 0x0011, KEY_2 },
3032cf86f6SMauro Carvalho Chehab 	{ 0x0012, KEY_4 },
3132cf86f6SMauro Carvalho Chehab 	{ 0x0015, KEY_3 },
3232cf86f6SMauro Carvalho Chehab 	{ 0x0016, KEY_5 },
3332cf86f6SMauro Carvalho Chehab 	{ 0x0017, KEY_CHANNELDOWN },     /* Ch Dn */
3432cf86f6SMauro Carvalho Chehab 	{ 0x0019, KEY_CHANNELUP },       /* CH Up */
3532cf86f6SMauro Carvalho Chehab 	{ 0x001a, KEY_PAUSE },           /* PAUSE */
3632cf86f6SMauro Carvalho Chehab 	{ 0x001b, KEY_1 },
3732cf86f6SMauro Carvalho Chehab 	{ 0x001d, KEY_AUDIO },           /* DUAL SOUND */
3832cf86f6SMauro Carvalho Chehab 	{ 0x001e, KEY_PLAY },            /* PLAY */
3932cf86f6SMauro Carvalho Chehab 	{ 0x001f, KEY_CAMERA },          /* SNAPSHOT */
4032cf86f6SMauro Carvalho Chehab 	{ 0x0040, KEY_VOLUMEUP },        /* Vol Up */
4132cf86f6SMauro Carvalho Chehab 	{ 0x0048, KEY_7 },
4232cf86f6SMauro Carvalho Chehab 	{ 0x004c, KEY_6 },
4332cf86f6SMauro Carvalho Chehab 	{ 0x004d, KEY_PLAYPAUSE },       /* TIMESHIFT */
4432cf86f6SMauro Carvalho Chehab 	{ 0x0054, KEY_0 },
4532cf86f6SMauro Carvalho Chehab };
4632cf86f6SMauro Carvalho Chehab 
47d100e659SMauro Carvalho Chehab static struct rc_map_list digittrade_map = {
4832cf86f6SMauro Carvalho Chehab 	.map = {
4932cf86f6SMauro Carvalho Chehab 		.scan     = digittrade,
5032cf86f6SMauro Carvalho Chehab 		.size     = ARRAY_SIZE(digittrade),
516d741bfeSSean Young 		.rc_proto = RC_PROTO_NEC,
5232cf86f6SMauro Carvalho Chehab 		.name     = RC_MAP_DIGITTRADE,
5332cf86f6SMauro Carvalho Chehab 	}
5432cf86f6SMauro Carvalho Chehab };
5532cf86f6SMauro Carvalho Chehab 
5632cf86f6SMauro Carvalho Chehab static int __init init_rc_map_digittrade(void)
5732cf86f6SMauro Carvalho Chehab {
58d100e659SMauro Carvalho Chehab 	return rc_map_register(&digittrade_map);
5932cf86f6SMauro Carvalho Chehab }
6032cf86f6SMauro Carvalho Chehab 
6132cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_digittrade(void)
6232cf86f6SMauro Carvalho Chehab {
63d100e659SMauro Carvalho Chehab 	rc_map_unregister(&digittrade_map);
6432cf86f6SMauro Carvalho Chehab }
6532cf86f6SMauro Carvalho Chehab 
6632cf86f6SMauro Carvalho Chehab module_init(init_rc_map_digittrade)
6732cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_digittrade)
6832cf86f6SMauro Carvalho Chehab 
6932cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
7032cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
71