132cf86f6SMauro Carvalho Chehab /*
232cf86f6SMauro Carvalho Chehab  * MSI DIGIVOX mini III 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>
2232cf86f6SMauro Carvalho Chehab 
2332cf86f6SMauro Carvalho Chehab /* MSI DIGIVOX mini III */
2432cf86f6SMauro Carvalho Chehab /* Uses NEC extended 0x61d6. */
2532cf86f6SMauro Carvalho Chehab /* This remote seems to be same as rc-kworld-315u.c. Anyhow, add new remote
2632cf86f6SMauro Carvalho Chehab    since rc-kworld-315u.c lacks NEC extended address byte. */
2732cf86f6SMauro Carvalho Chehab static struct ir_scancode msi_digivox_iii[] = {
2832cf86f6SMauro Carvalho Chehab 	{ 0x61d601, KEY_VIDEO },           /* Source */
2932cf86f6SMauro Carvalho Chehab 	{ 0x61d602, KEY_3 },
3032cf86f6SMauro Carvalho Chehab 	{ 0x61d603, KEY_POWER },           /* ShutDown */
3132cf86f6SMauro Carvalho Chehab 	{ 0x61d604, KEY_1 },
3232cf86f6SMauro Carvalho Chehab 	{ 0x61d605, KEY_5 },
3332cf86f6SMauro Carvalho Chehab 	{ 0x61d606, KEY_6 },
3432cf86f6SMauro Carvalho Chehab 	{ 0x61d607, KEY_CHANNELDOWN },     /* CH- */
3532cf86f6SMauro Carvalho Chehab 	{ 0x61d608, KEY_2 },
3632cf86f6SMauro Carvalho Chehab 	{ 0x61d609, KEY_CHANNELUP },       /* CH+ */
3732cf86f6SMauro Carvalho Chehab 	{ 0x61d60a, KEY_9 },
3832cf86f6SMauro Carvalho Chehab 	{ 0x61d60b, KEY_ZOOM },            /* Zoom */
3932cf86f6SMauro Carvalho Chehab 	{ 0x61d60c, KEY_7 },
4032cf86f6SMauro Carvalho Chehab 	{ 0x61d60d, KEY_8 },
4132cf86f6SMauro Carvalho Chehab 	{ 0x61d60e, KEY_VOLUMEUP },        /* Vol+ */
4232cf86f6SMauro Carvalho Chehab 	{ 0x61d60f, KEY_4 },
4332cf86f6SMauro Carvalho Chehab 	{ 0x61d610, KEY_ESC },             /* [back up arrow] */
4432cf86f6SMauro Carvalho Chehab 	{ 0x61d611, KEY_0 },
4532cf86f6SMauro Carvalho Chehab 	{ 0x61d612, KEY_OK },              /* [enter arrow] */
4632cf86f6SMauro Carvalho Chehab 	{ 0x61d613, KEY_VOLUMEDOWN },      /* Vol- */
4732cf86f6SMauro Carvalho Chehab 	{ 0x61d614, KEY_RECORD },          /* Rec */
4832cf86f6SMauro Carvalho Chehab 	{ 0x61d615, KEY_STOP },            /* Stop */
4932cf86f6SMauro Carvalho Chehab 	{ 0x61d616, KEY_PLAY },            /* Play */
5032cf86f6SMauro Carvalho Chehab 	{ 0x61d617, KEY_MUTE },            /* Mute */
5132cf86f6SMauro Carvalho Chehab 	{ 0x61d618, KEY_UP },
5232cf86f6SMauro Carvalho Chehab 	{ 0x61d619, KEY_DOWN },
5332cf86f6SMauro Carvalho Chehab 	{ 0x61d61a, KEY_LEFT },
5432cf86f6SMauro Carvalho Chehab 	{ 0x61d61b, KEY_RIGHT },
5532cf86f6SMauro Carvalho Chehab 	{ 0x61d61c, KEY_RED },
5632cf86f6SMauro Carvalho Chehab 	{ 0x61d61d, KEY_GREEN },
5732cf86f6SMauro Carvalho Chehab 	{ 0x61d61e, KEY_YELLOW },
5832cf86f6SMauro Carvalho Chehab 	{ 0x61d61f, KEY_BLUE },
5932cf86f6SMauro Carvalho Chehab 	{ 0x61d643, KEY_POWER2 },          /* [red power button] */
6032cf86f6SMauro Carvalho Chehab };
6132cf86f6SMauro Carvalho Chehab 
6232cf86f6SMauro Carvalho Chehab static struct rc_keymap msi_digivox_iii_map = {
6332cf86f6SMauro Carvalho Chehab 	.map = {
6432cf86f6SMauro Carvalho Chehab 		.scan    = msi_digivox_iii,
6532cf86f6SMauro Carvalho Chehab 		.size    = ARRAY_SIZE(msi_digivox_iii),
6652b66144SMauro Carvalho Chehab 		.rc_type = RC_TYPE_NEC,
6732cf86f6SMauro Carvalho Chehab 		.name    = RC_MAP_MSI_DIGIVOX_III,
6832cf86f6SMauro Carvalho Chehab 	}
6932cf86f6SMauro Carvalho Chehab };
7032cf86f6SMauro Carvalho Chehab 
7132cf86f6SMauro Carvalho Chehab static int __init init_rc_map_msi_digivox_iii(void)
7232cf86f6SMauro Carvalho Chehab {
7332cf86f6SMauro Carvalho Chehab 	return ir_register_map(&msi_digivox_iii_map);
7432cf86f6SMauro Carvalho Chehab }
7532cf86f6SMauro Carvalho Chehab 
7632cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_msi_digivox_iii(void)
7732cf86f6SMauro Carvalho Chehab {
7832cf86f6SMauro Carvalho Chehab 	ir_unregister_map(&msi_digivox_iii_map);
7932cf86f6SMauro Carvalho Chehab }
8032cf86f6SMauro Carvalho Chehab 
8132cf86f6SMauro Carvalho Chehab module_init(init_rc_map_msi_digivox_iii)
8232cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_msi_digivox_iii)
8332cf86f6SMauro Carvalho Chehab 
8432cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
8532cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
86