PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/media/rc/keymaps/rc-technisat-usb2.c

https://bitbucket.org/ndreys/linux-sunxi
C | 93 lines | 56 code | 7 blank | 30 comment | 0 complexity | f90b9463831e6b55629a5a41ddb0c76a MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1/* rc-technisat-usb2.c - Keytable for SkyStar HD USB
 2 *
 3 * Copyright (C) 2010 Patrick Boettcher,
 4 *                    Kernel Labs Inc. PO Box 745, St James, NY 11780
 5 *
 6 * Development was sponsored by Technisat Digital UK Limited, whose
 7 * registered office is Witan Gate House 500 - 600 Witan Gate West,
 8 * Milton Keynes, MK9 1SH
 9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *
20 * THIS PROGRAM IS PROVIDED "AS IS" AND BOTH THE COPYRIGHT HOLDER AND
21 * TECHNISAT DIGITAL UK LTD DISCLAIM ALL WARRANTIES WITH REGARD TO
22 * THIS PROGRAM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY OR
23 * FITNESS FOR A PARTICULAR PURPOSE.  NEITHER THE COPYRIGHT HOLDER
24 * NOR TECHNISAT DIGITAL UK LIMITED SHALL BE LIABLE FOR ANY SPECIAL,
25 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
26 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
27 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
28 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS PROGRAM. See the
29 * GNU General Public License for more details.
30 */
31
32#include <media/rc-map.h>
33
34static struct rc_map_table technisat_usb2[] = {
35	{0x0a0c, KEY_POWER},
36	{0x0a01, KEY_1},
37	{0x0a02, KEY_2},
38	{0x0a03, KEY_3},
39	{0x0a0d, KEY_MUTE},
40	{0x0a04, KEY_4},
41	{0x0a05, KEY_5},
42	{0x0a06, KEY_6},
43	{0x0a38, KEY_VIDEO}, /* EXT */
44	{0x0a07, KEY_7},
45	{0x0a08, KEY_8},
46	{0x0a09, KEY_9},
47	{0x0a00, KEY_0},
48	{0x0a4f, KEY_INFO},
49	{0x0a20, KEY_CHANNELUP},
50	{0x0a52, KEY_MENU},
51	{0x0a11, KEY_VOLUMEUP},
52	{0x0a57, KEY_OK},
53	{0x0a10, KEY_VOLUMEDOWN},
54	{0x0a2f, KEY_EPG},
55	{0x0a21, KEY_CHANNELDOWN},
56	{0x0a22, KEY_REFRESH},
57	{0x0a3c, KEY_TEXT},
58	{0x0a76, KEY_ENTER}, /* HOOK */
59	{0x0a0f, KEY_HELP},
60	{0x0a6b, KEY_RED},
61	{0x0a6c, KEY_GREEN},
62	{0x0a6d, KEY_YELLOW},
63	{0x0a6e, KEY_BLUE},
64	{0x0a29, KEY_STOP},
65	{0x0a23, KEY_LANGUAGE},
66	{0x0a53, KEY_TV},
67	{0x0a0a, KEY_PROGRAM},
68};
69
70static struct rc_map_list technisat_usb2_map = {
71	.map = {
72		.scan    = technisat_usb2,
73		.size    = ARRAY_SIZE(technisat_usb2),
74		.rc_type = RC_TYPE_RC5,
75		.name    = RC_MAP_TECHNISAT_USB2,
76	}
77};
78
79static int __init init_rc_map(void)
80{
81	return rc_map_register(&technisat_usb2_map);
82}
83
84static void __exit exit_rc_map(void)
85{
86	rc_map_unregister(&technisat_usb2_map);
87}
88
89module_init(init_rc_map)
90module_exit(exit_rc_map)
91
92MODULE_AUTHOR("Patrick Boettcher <pboettcher@kernellabs.com>");
93MODULE_LICENSE("GPL");