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 <media/rc-map.h>
22 
23 static struct rc_map_table snapstream_firefly[] = {
24 	{ 0xf12c, KEY_ZOOM },       /* Maximize */
25 	{ 0xc702, KEY_CLOSE },
26 
27 	{ 0xd20d, KEY_1 },
28 	{ 0xd30e, KEY_2 },
29 	{ 0xd40f, KEY_3 },
30 	{ 0xd510, KEY_4 },
31 	{ 0xd611, KEY_5 },
32 	{ 0xd712, KEY_6 },
33 	{ 0xd813, KEY_7 },
34 	{ 0xd914, KEY_8 },
35 	{ 0xda15, KEY_9 },
36 	{ 0xdc17, KEY_0 },
37 	{ 0xdb16, KEY_BACK },
38 	{ 0xdd18, KEY_KPENTER },    /* ent */
39 
40 	{ 0xce09, KEY_VOLUMEUP },
41 	{ 0xcd08, KEY_VOLUMEDOWN },
42 	{ 0xcf0a, KEY_MUTE },
43 	{ 0xd00b, KEY_CHANNELUP },
44 	{ 0xd10c, KEY_CHANNELDOWN },
45 	{ 0xc500, KEY_VENDOR },     /* firefly */
46 
47 	{ 0xf32e, KEY_INFO },
48 	{ 0xf42f, KEY_OPTION },
49 
50 	{ 0xe21d, KEY_LEFT },
51 	{ 0xe41f, KEY_RIGHT },
52 	{ 0xe722, KEY_DOWN },
53 	{ 0xdf1a, KEY_UP },
54 	{ 0xe31e, KEY_OK },
55 
56 	{ 0xe11c, KEY_MENU },
57 	{ 0xe520, KEY_EXIT },
58 
59 	{ 0xec27, KEY_RECORD },
60 	{ 0xea25, KEY_PLAY },
61 	{ 0xed28, KEY_STOP },
62 	{ 0xe924, KEY_REWIND },
63 	{ 0xeb26, KEY_FORWARD },
64 	{ 0xee29, KEY_PAUSE },
65 	{ 0xf02b, KEY_PREVIOUS },
66 	{ 0xef2a, KEY_NEXT },
67 
68 	{ 0xcb06, KEY_AUDIO },      /* Music */
69 	{ 0xca05, KEY_IMAGES },     /* Photos */
70 	{ 0xc904, KEY_DVD },
71 	{ 0xc803, KEY_TV },
72 	{ 0xcc07, KEY_VIDEO },
73 
74 	{ 0xc601, KEY_HELP },
75 	{ 0xf22d, KEY_MODE },       /* Mouse */
76 
77 	{ 0xde19, KEY_A },
78 	{ 0xe01b, KEY_B },
79 	{ 0xe621, KEY_C },
80 	{ 0xe823, KEY_D },
81 };
82 
83 static struct rc_map_list snapstream_firefly_map = {
84 	.map = {
85 		.scan    = snapstream_firefly,
86 		.size    = ARRAY_SIZE(snapstream_firefly),
87 		.rc_type = RC_TYPE_OTHER,
88 		.name    = RC_MAP_SNAPSTREAM_FIREFLY,
89 	}
90 };
91 
92 static int __init init_rc_map_snapstream_firefly(void)
93 {
94 	return rc_map_register(&snapstream_firefly_map);
95 }
96 
97 static void __exit exit_rc_map_snapstream_firefly(void)
98 {
99 	rc_map_unregister(&snapstream_firefly_map);
100 }
101 
102 module_init(init_rc_map_snapstream_firefly)
103 module_exit(exit_rc_map_snapstream_firefly)
104 
105 MODULE_LICENSE("GPL");
106 MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
107