[media] ati_remote: switch to single-byte scancodes
[deliverable/linux.git] / drivers / media / rc / keymaps / rc-ati-x10.c
CommitLineData
c34516e5
AH
1/*
2 * ATI X10 RF remote keytable
3 *
4 * Copyright (C) 2011 Anssi Hannula <anssi.hannula@?ki.fi>
5 *
6 * This file is based on the static generic keytable previously found in
7 * ati_remote.c, which is
8 * Copyright (c) 2004 Torrey Hoffman <thoffman@arnor.net>
9 * Copyright (c) 2002 Vladimir Dergachev
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 */
25
547d42ea 26#include <linux/module.h>
c34516e5
AH
27#include <media/rc-map.h>
28
29static struct rc_map_table ati_x10[] = {
5eefb4f0
AH
30 { 0x0d, KEY_1 },
31 { 0x0e, KEY_2 },
32 { 0x0f, KEY_3 },
33 { 0x10, KEY_4 },
34 { 0x11, KEY_5 },
35 { 0x12, KEY_6 },
36 { 0x13, KEY_7 },
37 { 0x14, KEY_8 },
38 { 0x15, KEY_9 },
39 { 0x17, KEY_0 },
40 { 0x00, KEY_A },
41 { 0x01, KEY_B },
42 { 0x19, KEY_C },
43 { 0x1b, KEY_D },
44 { 0x21, KEY_E },
45 { 0x23, KEY_F },
c34516e5 46
5eefb4f0
AH
47 { 0x18, KEY_KPENTER }, /* "check" */
48 { 0x16, KEY_MENU }, /* "menu" */
49 { 0x02, KEY_POWER }, /* Power */
50 { 0x03, KEY_TV }, /* TV */
51 { 0x04, KEY_DVD }, /* DVD */
52 { 0x05, KEY_WWW }, /* WEB */
53 { 0x06, KEY_BOOKMARKS }, /* "book" */
54 { 0x07, KEY_EDIT }, /* "hand" */
55 { 0x1c, KEY_COFFEE }, /* "timer" */
56 { 0x20, KEY_FRONT }, /* "max" */
57 { 0x1d, KEY_LEFT }, /* left */
58 { 0x1f, KEY_RIGHT }, /* right */
59 { 0x22, KEY_DOWN }, /* down */
60 { 0x1a, KEY_UP }, /* up */
61 { 0x1e, KEY_OK }, /* "OK" */
62 { 0x09, KEY_VOLUMEDOWN }, /* VOL + */
63 { 0x08, KEY_VOLUMEUP }, /* VOL - */
64 { 0x0a, KEY_MUTE }, /* MUTE */
65 { 0x0b, KEY_CHANNELUP }, /* CH + */
66 { 0x0c, KEY_CHANNELDOWN },/* CH - */
67 { 0x27, KEY_RECORD }, /* ( o) red */
68 { 0x25, KEY_PLAY }, /* ( >) */
69 { 0x24, KEY_REWIND }, /* (<<) */
70 { 0x26, KEY_FORWARD }, /* (>>) */
71 { 0x28, KEY_STOP }, /* ([]) */
72 { 0x29, KEY_PAUSE }, /* ('') */
73 { 0x2b, KEY_PREVIOUS }, /* (<-) */
74 { 0x2a, KEY_NEXT }, /* (>+) */
75 { 0x2d, KEY_INFO }, /* PLAYING */
76 { 0x2e, KEY_HOME }, /* TOP */
77 { 0x2f, KEY_END }, /* END */
78 { 0x30, KEY_SELECT }, /* SELECT */
c34516e5
AH
79};
80
81static struct rc_map_list ati_x10_map = {
82 .map = {
83 .scan = ati_x10,
84 .size = ARRAY_SIZE(ati_x10),
85 .rc_type = RC_TYPE_OTHER,
86 .name = RC_MAP_ATI_X10,
87 }
88};
89
90static int __init init_rc_map_ati_x10(void)
91{
92 return rc_map_register(&ati_x10_map);
93}
94
95static void __exit exit_rc_map_ati_x10(void)
96{
97 rc_map_unregister(&ati_x10_map);
98}
99
100module_init(init_rc_map_ati_x10)
101module_exit(exit_rc_map_ati_x10)
102
103MODULE_LICENSE("GPL");
104MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
This page took 0.03837 seconds and 5 git commands to generate.