1/* manli.h - Keytable for manli Remote Controller
2 *
3 * keymap imported from ir-keymaps.c
4 *
5 * Copyright (c) 2010 by Mauro Carvalho Chehab
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#include <media/rc-map.h>
14#include <linux/module.h>
15
16/* Michael Tokarev <mjt@tls.msk.ru>
17   keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
18   least, and probably other cards too.
19   The "ascii-art picture" below (in comments, first row
20   is the keycode in hex, and subsequent row(s) shows
21   the button labels (several variants when appropriate)
22   helps to descide which keycodes to assign to the buttons.
23 */
24
25static struct rc_map_table manli[] = {
26
27	/*  0x1c            0x12  *
28	 * FUNCTION         POWER *
29	 *   FM              (|)  *
30	 *                        */
31	{ 0x1c, KEY_RADIO },	/*XXX*/
32	{ 0x12, KEY_POWER },
33
34	/*  0x01    0x02    0x03  *
35	 *   1       2       3    *
36	 *                        *
37	 *  0x04    0x05    0x06  *
38	 *   4       5       6    *
39	 *                        *
40	 *  0x07    0x08    0x09  *
41	 *   7       8       9    *
42	 *                        */
43	{ 0x01, KEY_1 },
44	{ 0x02, KEY_2 },
45	{ 0x03, KEY_3 },
46	{ 0x04, KEY_4 },
47	{ 0x05, KEY_5 },
48	{ 0x06, KEY_6 },
49	{ 0x07, KEY_7 },
50	{ 0x08, KEY_8 },
51	{ 0x09, KEY_9 },
52
53	/*  0x0a    0x00    0x17  *
54	 * RECALL    0      +100  *
55	 *                  PLUS  *
56	 *                        */
57	{ 0x0a, KEY_AGAIN },	/*XXX KEY_REWIND? */
58	{ 0x00, KEY_0 },
59	{ 0x17, KEY_DIGITS },	/*XXX*/
60
61	/*  0x14            0x10  *
62	 *  MENU            INFO  *
63	 *  OSD                   */
64	{ 0x14, KEY_MENU },
65	{ 0x10, KEY_INFO },
66
67	/*          0x0b          *
68	 *           Up           *
69	 *                        *
70	 *  0x18    0x16    0x0c  *
71	 *  Left     Ok     Right *
72	 *                        *
73	 *         0x015          *
74	 *         Down           *
75	 *                        */
76	{ 0x0b, KEY_UP },
77	{ 0x18, KEY_LEFT },
78	{ 0x16, KEY_OK },	/*XXX KEY_SELECT? KEY_ENTER? */
79	{ 0x0c, KEY_RIGHT },
80	{ 0x15, KEY_DOWN },
81
82	/*  0x11            0x0d  *
83	 *  TV/AV           MODE  *
84	 *  SOURCE         STEREO *
85	 *                        */
86	{ 0x11, KEY_TV },	/*XXX*/
87	{ 0x0d, KEY_MODE },	/*XXX there's no KEY_STEREO	*/
88
89	/*  0x0f    0x1b    0x1a  *
90	 *  AUDIO   Vol+    Chan+ *
91	 *        TIMESHIFT???    *
92	 *                        *
93	 *  0x0e    0x1f    0x1e  *
94	 *  SLEEP   Vol-    Chan- *
95	 *                        */
96	{ 0x0f, KEY_AUDIO },
97	{ 0x1b, KEY_VOLUMEUP },
98	{ 0x1a, KEY_CHANNELUP },
99	{ 0x0e, KEY_TIME },
100	{ 0x1f, KEY_VOLUMEDOWN },
101	{ 0x1e, KEY_CHANNELDOWN },
102
103	/*         0x13     0x19  *
104	 *         MUTE   SNAPSHOT*
105	 *                        */
106	{ 0x13, KEY_MUTE },
107	{ 0x19, KEY_CAMERA },
108
109	/* 0x1d unused ? */
110};
111
112static struct rc_map_list manli_map = {
113	.map = {
114		.scan    = manli,
115		.size    = ARRAY_SIZE(manli),
116		.rc_type = RC_TYPE_UNKNOWN,	/* Legacy IR type */
117		.name    = RC_MAP_MANLI,
118	}
119};
120
121static int __init init_rc_map_manli(void)
122{
123	return rc_map_register(&manli_map);
124}
125
126static void __exit exit_rc_map_manli(void)
127{
128	rc_map_unregister(&manli_map);
129}
130
131module_init(init_rc_map_manli)
132module_exit(exit_rc_map_manli)
133
134MODULE_LICENSE("GPL");
135MODULE_AUTHOR("Mauro Carvalho Chehab");
136