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