Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[pandora-kernel.git] / drivers / media / rc / keymaps / rc-snapstream-firefly.c
1 /*
2  * SnapStream Firefly X10 RF remote keytable
3  *
4  * Copyright (C) 2011 Anssi Hannula <anssi.hannula@?ki.fi>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #include <linux/module.h>
22 #include <media/rc-map.h>
23
24 static struct rc_map_table snapstream_firefly[] = {
25         { 0x2c, KEY_ZOOM },       /* Maximize */
26         { 0x02, KEY_CLOSE },
27
28         { 0x0d, KEY_1 },
29         { 0x0e, KEY_2 },
30         { 0x0f, KEY_3 },
31         { 0x10, KEY_4 },
32         { 0x11, KEY_5 },
33         { 0x12, KEY_6 },
34         { 0x13, KEY_7 },
35         { 0x14, KEY_8 },
36         { 0x15, KEY_9 },
37         { 0x17, KEY_0 },
38         { 0x16, KEY_BACK },
39         { 0x18, KEY_KPENTER },    /* ent */
40
41         { 0x09, KEY_VOLUMEUP },
42         { 0x08, KEY_VOLUMEDOWN },
43         { 0x0a, KEY_MUTE },
44         { 0x0b, KEY_CHANNELUP },
45         { 0x0c, KEY_CHANNELDOWN },
46         { 0x00, KEY_VENDOR },     /* firefly */
47
48         { 0x2e, KEY_INFO },
49         { 0x2f, KEY_OPTION },
50
51         { 0x1d, KEY_LEFT },
52         { 0x1f, KEY_RIGHT },
53         { 0x22, KEY_DOWN },
54         { 0x1a, KEY_UP },
55         { 0x1e, KEY_OK },
56
57         { 0x1c, KEY_MENU },
58         { 0x20, KEY_EXIT },
59
60         { 0x27, KEY_RECORD },
61         { 0x25, KEY_PLAY },
62         { 0x28, KEY_STOP },
63         { 0x24, KEY_REWIND },
64         { 0x26, KEY_FORWARD },
65         { 0x29, KEY_PAUSE },
66         { 0x2b, KEY_PREVIOUS },
67         { 0x2a, KEY_NEXT },
68
69         { 0x06, KEY_AUDIO },      /* Music */
70         { 0x05, KEY_IMAGES },     /* Photos */
71         { 0x04, KEY_DVD },
72         { 0x03, KEY_TV },
73         { 0x07, KEY_VIDEO },
74
75         { 0x01, KEY_HELP },
76         { 0x2d, KEY_MODE },       /* Mouse */
77
78         { 0x19, KEY_A },
79         { 0x1b, KEY_B },
80         { 0x21, KEY_C },
81         { 0x23, KEY_D },
82 };
83
84 static struct rc_map_list snapstream_firefly_map = {
85         .map = {
86                 .scan    = snapstream_firefly,
87                 .size    = ARRAY_SIZE(snapstream_firefly),
88                 .rc_type = RC_TYPE_OTHER,
89                 .name    = RC_MAP_SNAPSTREAM_FIREFLY,
90         }
91 };
92
93 static int __init init_rc_map_snapstream_firefly(void)
94 {
95         return rc_map_register(&snapstream_firefly_map);
96 }
97
98 static void __exit exit_rc_map_snapstream_firefly(void)
99 {
100         rc_map_unregister(&snapstream_firefly_map);
101 }
102
103 module_init(init_rc_map_snapstream_firefly)
104 module_exit(exit_rc_map_snapstream_firefly)
105
106 MODULE_LICENSE("GPL");
107 MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");