xref: /linux/drivers/media/rc/keymaps/rc-msi-digivox-iii.c (revision 17cfcb68af3bc7d5e8ae08779b1853310a2949f3)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * MSI DIGIVOX mini III remote controller keytable
4  *
5  * Copyright (C) 2010 Antti Palosaari <crope@iki.fi>
6  */
7 
8 #include <media/rc-map.h>
9 #include <linux/module.h>
10 
11 /* MSI DIGIVOX mini III */
12 /* Uses NEC extended 0x61d6. */
13 /* This remote seems to be same as rc-kworld-315u.c. Anyhow, add new remote
14    since rc-kworld-315u.c lacks NEC extended address byte. */
15 static struct rc_map_table msi_digivox_iii[] = {
16 	{ 0x61d601, KEY_VIDEO },           /* Source */
17 	{ 0x61d602, KEY_NUMERIC_3 },
18 	{ 0x61d603, KEY_POWER },           /* ShutDown */
19 	{ 0x61d604, KEY_NUMERIC_1 },
20 	{ 0x61d605, KEY_NUMERIC_5 },
21 	{ 0x61d606, KEY_NUMERIC_6 },
22 	{ 0x61d607, KEY_CHANNELDOWN },     /* CH- */
23 	{ 0x61d608, KEY_NUMERIC_2 },
24 	{ 0x61d609, KEY_CHANNELUP },       /* CH+ */
25 	{ 0x61d60a, KEY_NUMERIC_9 },
26 	{ 0x61d60b, KEY_ZOOM },            /* Zoom */
27 	{ 0x61d60c, KEY_NUMERIC_7 },
28 	{ 0x61d60d, KEY_NUMERIC_8 },
29 	{ 0x61d60e, KEY_VOLUMEUP },        /* Vol+ */
30 	{ 0x61d60f, KEY_NUMERIC_4 },
31 	{ 0x61d610, KEY_ESC },             /* [back up arrow] */
32 	{ 0x61d611, KEY_NUMERIC_0 },
33 	{ 0x61d612, KEY_OK },              /* [enter arrow] */
34 	{ 0x61d613, KEY_VOLUMEDOWN },      /* Vol- */
35 	{ 0x61d614, KEY_RECORD },          /* Rec */
36 	{ 0x61d615, KEY_STOP },            /* Stop */
37 	{ 0x61d616, KEY_PLAY },            /* Play */
38 	{ 0x61d617, KEY_MUTE },            /* Mute */
39 	{ 0x61d618, KEY_UP },
40 	{ 0x61d619, KEY_DOWN },
41 	{ 0x61d61a, KEY_LEFT },
42 	{ 0x61d61b, KEY_RIGHT },
43 	{ 0x61d61c, KEY_RED },
44 	{ 0x61d61d, KEY_GREEN },
45 	{ 0x61d61e, KEY_YELLOW },
46 	{ 0x61d61f, KEY_BLUE },
47 	{ 0x61d643, KEY_POWER2 },          /* [red power button] */
48 };
49 
50 static struct rc_map_list msi_digivox_iii_map = {
51 	.map = {
52 		.scan     = msi_digivox_iii,
53 		.size     = ARRAY_SIZE(msi_digivox_iii),
54 		.rc_proto = RC_PROTO_NECX,
55 		.name     = RC_MAP_MSI_DIGIVOX_III,
56 	}
57 };
58 
59 static int __init init_rc_map_msi_digivox_iii(void)
60 {
61 	return rc_map_register(&msi_digivox_iii_map);
62 }
63 
64 static void __exit exit_rc_map_msi_digivox_iii(void)
65 {
66 	rc_map_unregister(&msi_digivox_iii_map);
67 }
68 
69 module_init(init_rc_map_msi_digivox_iii)
70 module_exit(exit_rc_map_msi_digivox_iii)
71 
72 MODULE_LICENSE("GPL");
73 MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
74