xref: /linux/drivers/media/rc/keymaps/rc-manli.c (revision 1910ea428f28e5731a2cea32b86e71953829f15d)
1688c73c6SMauro Carvalho Chehab // SPDX-License-Identifier: GPL-2.0+
2688c73c6SMauro Carvalho Chehab // manli.h - Keytable for manli Remote Controller
3688c73c6SMauro Carvalho Chehab //
4688c73c6SMauro Carvalho Chehab // keymap imported from ir-keymaps.c
5688c73c6SMauro Carvalho Chehab //
6688c73c6SMauro Carvalho Chehab // Copyright (c) 2010 by Mauro 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 /* Michael Tokarev <mjt@tls.msk.ru>
1232cf86f6SMauro Carvalho Chehab    keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
1332cf86f6SMauro Carvalho Chehab    least, and probably other cards too.
1432cf86f6SMauro Carvalho Chehab    The "ascii-art picture" below (in comments, first row
1532cf86f6SMauro Carvalho Chehab    is the keycode in hex, and subsequent row(s) shows
1632cf86f6SMauro Carvalho Chehab    the button labels (several variants when appropriate)
1704ad3011SMauro Carvalho Chehab    helps to decide which keycodes to assign to the buttons.
1832cf86f6SMauro Carvalho Chehab  */
1932cf86f6SMauro Carvalho Chehab 
202f4f58d6SMauro Carvalho Chehab static struct rc_map_table manli[] = {
2132cf86f6SMauro Carvalho Chehab 
2232cf86f6SMauro Carvalho Chehab 	/*  0x1c            0x12  *
2332cf86f6SMauro Carvalho Chehab 	 * FUNCTION         POWER *
2432cf86f6SMauro Carvalho Chehab 	 *   FM              (|)  *
2532cf86f6SMauro Carvalho Chehab 	 *                        */
2632cf86f6SMauro Carvalho Chehab 	{ 0x1c, KEY_RADIO },	/*XXX*/
2732cf86f6SMauro Carvalho Chehab 	{ 0x12, KEY_POWER },
2832cf86f6SMauro Carvalho Chehab 
2932cf86f6SMauro Carvalho Chehab 	/*  0x01    0x02    0x03  *
3032cf86f6SMauro Carvalho Chehab 	 *   1       2       3    *
3132cf86f6SMauro Carvalho Chehab 	 *                        *
3232cf86f6SMauro Carvalho Chehab 	 *  0x04    0x05    0x06  *
3332cf86f6SMauro Carvalho Chehab 	 *   4       5       6    *
3432cf86f6SMauro Carvalho Chehab 	 *                        *
3532cf86f6SMauro Carvalho Chehab 	 *  0x07    0x08    0x09  *
3632cf86f6SMauro Carvalho Chehab 	 *   7       8       9    *
3732cf86f6SMauro Carvalho Chehab 	 *                        */
38*1910ea42SBastien Nocera 	{ 0x01, KEY_NUMERIC_1 },
39*1910ea42SBastien Nocera 	{ 0x02, KEY_NUMERIC_2 },
40*1910ea42SBastien Nocera 	{ 0x03, KEY_NUMERIC_3 },
41*1910ea42SBastien Nocera 	{ 0x04, KEY_NUMERIC_4 },
42*1910ea42SBastien Nocera 	{ 0x05, KEY_NUMERIC_5 },
43*1910ea42SBastien Nocera 	{ 0x06, KEY_NUMERIC_6 },
44*1910ea42SBastien Nocera 	{ 0x07, KEY_NUMERIC_7 },
45*1910ea42SBastien Nocera 	{ 0x08, KEY_NUMERIC_8 },
46*1910ea42SBastien Nocera 	{ 0x09, KEY_NUMERIC_9 },
4732cf86f6SMauro Carvalho Chehab 
4832cf86f6SMauro Carvalho Chehab 	/*  0x0a    0x00    0x17  *
4932cf86f6SMauro Carvalho Chehab 	 * RECALL    0      +100  *
5032cf86f6SMauro Carvalho Chehab 	 *                  PLUS  *
5132cf86f6SMauro Carvalho Chehab 	 *                        */
5232cf86f6SMauro Carvalho Chehab 	{ 0x0a, KEY_AGAIN },	/*XXX KEY_REWIND? */
53*1910ea42SBastien Nocera 	{ 0x00, KEY_NUMERIC_0 },
5432cf86f6SMauro Carvalho Chehab 	{ 0x17, KEY_DIGITS },	/*XXX*/
5532cf86f6SMauro Carvalho Chehab 
5632cf86f6SMauro Carvalho Chehab 	/*  0x14            0x10  *
5732cf86f6SMauro Carvalho Chehab 	 *  MENU            INFO  *
5832cf86f6SMauro Carvalho Chehab 	 *  OSD                   */
5932cf86f6SMauro Carvalho Chehab 	{ 0x14, KEY_MENU },
6032cf86f6SMauro Carvalho Chehab 	{ 0x10, KEY_INFO },
6132cf86f6SMauro Carvalho Chehab 
6232cf86f6SMauro Carvalho Chehab 	/*          0x0b          *
6332cf86f6SMauro Carvalho Chehab 	 *           Up           *
6432cf86f6SMauro Carvalho Chehab 	 *                        *
6532cf86f6SMauro Carvalho Chehab 	 *  0x18    0x16    0x0c  *
6632cf86f6SMauro Carvalho Chehab 	 *  Left     Ok     Right *
6732cf86f6SMauro Carvalho Chehab 	 *                        *
6832cf86f6SMauro Carvalho Chehab 	 *         0x015          *
6932cf86f6SMauro Carvalho Chehab 	 *         Down           *
7032cf86f6SMauro Carvalho Chehab 	 *                        */
7132cf86f6SMauro Carvalho Chehab 	{ 0x0b, KEY_UP },
7232cf86f6SMauro Carvalho Chehab 	{ 0x18, KEY_LEFT },
7332cf86f6SMauro Carvalho Chehab 	{ 0x16, KEY_OK },	/*XXX KEY_SELECT? KEY_ENTER? */
7432cf86f6SMauro Carvalho Chehab 	{ 0x0c, KEY_RIGHT },
7532cf86f6SMauro Carvalho Chehab 	{ 0x15, KEY_DOWN },
7632cf86f6SMauro Carvalho Chehab 
7732cf86f6SMauro Carvalho Chehab 	/*  0x11            0x0d  *
7832cf86f6SMauro Carvalho Chehab 	 *  TV/AV           MODE  *
7932cf86f6SMauro Carvalho Chehab 	 *  SOURCE         STEREO *
8032cf86f6SMauro Carvalho Chehab 	 *                        */
8132cf86f6SMauro Carvalho Chehab 	{ 0x11, KEY_TV },	/*XXX*/
8232cf86f6SMauro Carvalho Chehab 	{ 0x0d, KEY_MODE },	/*XXX there's no KEY_STEREO	*/
8332cf86f6SMauro Carvalho Chehab 
8432cf86f6SMauro Carvalho Chehab 	/*  0x0f    0x1b    0x1a  *
8532cf86f6SMauro Carvalho Chehab 	 *  AUDIO   Vol+    Chan+ *
8632cf86f6SMauro Carvalho Chehab 	 *        TIMESHIFT???    *
8732cf86f6SMauro Carvalho Chehab 	 *                        *
8832cf86f6SMauro Carvalho Chehab 	 *  0x0e    0x1f    0x1e  *
8932cf86f6SMauro Carvalho Chehab 	 *  SLEEP   Vol-    Chan- *
9032cf86f6SMauro Carvalho Chehab 	 *                        */
9132cf86f6SMauro Carvalho Chehab 	{ 0x0f, KEY_AUDIO },
9232cf86f6SMauro Carvalho Chehab 	{ 0x1b, KEY_VOLUMEUP },
9332cf86f6SMauro Carvalho Chehab 	{ 0x1a, KEY_CHANNELUP },
9432cf86f6SMauro Carvalho Chehab 	{ 0x0e, KEY_TIME },
9532cf86f6SMauro Carvalho Chehab 	{ 0x1f, KEY_VOLUMEDOWN },
9632cf86f6SMauro Carvalho Chehab 	{ 0x1e, KEY_CHANNELDOWN },
9732cf86f6SMauro Carvalho Chehab 
9832cf86f6SMauro Carvalho Chehab 	/*         0x13     0x19  *
9932cf86f6SMauro Carvalho Chehab 	 *         MUTE   SNAPSHOT*
10032cf86f6SMauro Carvalho Chehab 	 *                        */
10132cf86f6SMauro Carvalho Chehab 	{ 0x13, KEY_MUTE },
10232cf86f6SMauro Carvalho Chehab 	{ 0x19, KEY_CAMERA },
10332cf86f6SMauro Carvalho Chehab 
10432cf86f6SMauro Carvalho Chehab 	/* 0x1d unused ? */
10532cf86f6SMauro Carvalho Chehab };
10632cf86f6SMauro Carvalho Chehab 
107d100e659SMauro Carvalho Chehab static struct rc_map_list manli_map = {
10832cf86f6SMauro Carvalho Chehab 	.map = {
10932cf86f6SMauro Carvalho Chehab 		.scan     = manli,
11032cf86f6SMauro Carvalho Chehab 		.size     = ARRAY_SIZE(manli),
1116d741bfeSSean Young 		.rc_proto = RC_PROTO_UNKNOWN,	/* Legacy IR type */
11232cf86f6SMauro Carvalho Chehab 		.name     = RC_MAP_MANLI,
11332cf86f6SMauro Carvalho Chehab 	}
11432cf86f6SMauro Carvalho Chehab };
11532cf86f6SMauro Carvalho Chehab 
11632cf86f6SMauro Carvalho Chehab static int __init init_rc_map_manli(void)
11732cf86f6SMauro Carvalho Chehab {
118d100e659SMauro Carvalho Chehab 	return rc_map_register(&manli_map);
11932cf86f6SMauro Carvalho Chehab }
12032cf86f6SMauro Carvalho Chehab 
12132cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_manli(void)
12232cf86f6SMauro Carvalho Chehab {
123d100e659SMauro Carvalho Chehab 	rc_map_unregister(&manli_map);
12432cf86f6SMauro Carvalho Chehab }
12532cf86f6SMauro Carvalho Chehab 
12632cf86f6SMauro Carvalho Chehab module_init(init_rc_map_manli)
12732cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_manli)
12832cf86f6SMauro Carvalho Chehab 
12932cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
13037e59f87SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab");
131