Introduce ARCH_NO_SYSDEV_OPS config option (v2)
[pandora-kernel.git] / drivers / media / rc / keymaps / rc-hauppauge-new.c
1 /* hauppauge-new.h - Keytable for hauppauge_new Remote Controller
2  *
3  * keymap imported from ir-keymaps.c
4  *
5  * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
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
15 /* Hauppauge: the newer, gray remotes (seems there are multiple
16  * slightly different versions), shipped with cx88+ivtv cards.
17  * almost rc5 coding, but some non-standard keys */
18
19 static struct rc_map_table hauppauge_new[] = {
20         /* Keys 0 to 9 */
21         { 0x00, KEY_0 },
22         { 0x01, KEY_1 },
23         { 0x02, KEY_2 },
24         { 0x03, KEY_3 },
25         { 0x04, KEY_4 },
26         { 0x05, KEY_5 },
27         { 0x06, KEY_6 },
28         { 0x07, KEY_7 },
29         { 0x08, KEY_8 },
30         { 0x09, KEY_9 },
31
32         { 0x0a, KEY_TEXT },             /* keypad asterisk as well */
33         { 0x0b, KEY_RED },              /* red button */
34         { 0x0c, KEY_RADIO },
35         { 0x0d, KEY_MENU },
36         { 0x0e, KEY_SUBTITLE },         /* also the # key */
37         { 0x0f, KEY_MUTE },
38         { 0x10, KEY_VOLUMEUP },
39         { 0x11, KEY_VOLUMEDOWN },
40         { 0x12, KEY_PREVIOUS },         /* previous channel */
41         { 0x14, KEY_UP },
42         { 0x15, KEY_DOWN },
43         { 0x16, KEY_LEFT },
44         { 0x17, KEY_RIGHT },
45         { 0x18, KEY_VIDEO },            /* Videos */
46         { 0x19, KEY_AUDIO },            /* Music */
47         /* 0x1a: Pictures - presume this means
48            "Multimedia Home Platform" -
49            no "PICTURES" key in input.h
50          */
51         { 0x1a, KEY_MHP },
52
53         { 0x1b, KEY_EPG },              /* Guide */
54         { 0x1c, KEY_TV },
55         { 0x1e, KEY_NEXTSONG },         /* skip >| */
56         { 0x1f, KEY_EXIT },             /* back/exit */
57         { 0x20, KEY_CHANNELUP },        /* channel / program + */
58         { 0x21, KEY_CHANNELDOWN },      /* channel / program - */
59         { 0x22, KEY_CHANNEL },          /* source (old black remote) */
60         { 0x24, KEY_PREVIOUSSONG },     /* replay |< */
61         { 0x25, KEY_ENTER },            /* OK */
62         { 0x26, KEY_SLEEP },            /* minimize (old black remote) */
63         { 0x29, KEY_BLUE },             /* blue key */
64         { 0x2e, KEY_GREEN },            /* green button */
65         { 0x30, KEY_PAUSE },            /* pause */
66         { 0x32, KEY_REWIND },           /* backward << */
67         { 0x34, KEY_FASTFORWARD },      /* forward >> */
68         { 0x35, KEY_PLAY },
69         { 0x36, KEY_STOP },
70         { 0x37, KEY_RECORD },           /* recording */
71         { 0x38, KEY_YELLOW },           /* yellow key */
72         { 0x3b, KEY_SELECT },           /* top right button */
73         { 0x3c, KEY_ZOOM },             /* full */
74         { 0x3d, KEY_POWER },            /* system power (green button) */
75 };
76
77 static struct rc_map_list hauppauge_new_map = {
78         .map = {
79                 .scan    = hauppauge_new,
80                 .size    = ARRAY_SIZE(hauppauge_new),
81                 .rc_type = RC_TYPE_UNKNOWN,     /* Legacy IR type */
82                 .name    = RC_MAP_HAUPPAUGE_NEW,
83         }
84 };
85
86 static int __init init_rc_map_hauppauge_new(void)
87 {
88         return rc_map_register(&hauppauge_new_map);
89 }
90
91 static void __exit exit_rc_map_hauppauge_new(void)
92 {
93         rc_map_unregister(&hauppauge_new_map);
94 }
95
96 module_init(init_rc_map_hauppauge_new)
97 module_exit(exit_rc_map_hauppauge_new)
98
99 MODULE_LICENSE("GPL");
100 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");