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 
26 #include <media/rc-map.h>
27 
28 static struct rc_map_table ati_x10[] = {
29 	{ 0xd20d, KEY_1 },
30 	{ 0xd30e, KEY_2 },
31 	{ 0xd40f, KEY_3 },
32 	{ 0xd510, KEY_4 },
33 	{ 0xd611, KEY_5 },
34 	{ 0xd712, KEY_6 },
35 	{ 0xd813, KEY_7 },
36 	{ 0xd914, KEY_8 },
37 	{ 0xda15, KEY_9 },
38 	{ 0xdc17, KEY_0 },
39 	{ 0xc500, KEY_A },
40 	{ 0xc601, KEY_B },
41 	{ 0xde19, KEY_C },
42 	{ 0xe01b, KEY_D },
43 	{ 0xe621, KEY_E },
44 	{ 0xe823, KEY_F },
45 
46 	{ 0xdd18, KEY_KPENTER },    /* "check" */
47 	{ 0xdb16, KEY_MENU },       /* "menu" */
48 	{ 0xc702, KEY_POWER },      /* Power */
49 	{ 0xc803, KEY_TV },         /* TV */
50 	{ 0xc904, KEY_DVD },        /* DVD */
51 	{ 0xca05, KEY_WWW },        /* WEB */
52 	{ 0xcb06, KEY_BOOKMARKS },  /* "book" */
53 	{ 0xcc07, KEY_EDIT },       /* "hand" */
54 	{ 0xe11c, KEY_COFFEE },     /* "timer" */
55 	{ 0xe520, KEY_FRONT },      /* "max" */
56 	{ 0xe21d, KEY_LEFT },       /* left */
57 	{ 0xe41f, KEY_RIGHT },      /* right */
58 	{ 0xe722, KEY_DOWN },       /* down */
59 	{ 0xdf1a, KEY_UP },         /* up */
60 	{ 0xe31e, KEY_OK },         /* "OK" */
61 	{ 0xce09, KEY_VOLUMEDOWN }, /* VOL + */
62 	{ 0xcd08, KEY_VOLUMEUP },   /* VOL - */
63 	{ 0xcf0a, KEY_MUTE },       /* MUTE  */
64 	{ 0xd00b, KEY_CHANNELUP },  /* CH + */
65 	{ 0xd10c, KEY_CHANNELDOWN },/* CH - */
66 	{ 0xec27, KEY_RECORD },     /* ( o) red */
67 	{ 0xea25, KEY_PLAY },       /* ( >) */
68 	{ 0xe924, KEY_REWIND },     /* (<<) */
69 	{ 0xeb26, KEY_FORWARD },    /* (>>) */
70 	{ 0xed28, KEY_STOP },       /* ([]) */
71 	{ 0xee29, KEY_PAUSE },      /* ('') */
72 	{ 0xf02b, KEY_PREVIOUS },   /* (<-) */
73 	{ 0xef2a, KEY_NEXT },       /* (>+) */
74 	{ 0xf22d, KEY_INFO },       /* PLAYING */
75 	{ 0xf32e, KEY_HOME },       /* TOP */
76 	{ 0xf42f, KEY_END },        /* END */
77 	{ 0xf530, KEY_SELECT },     /* SELECT */
78 };
79 
80 static struct rc_map_list ati_x10_map = {
81 	.map = {
82 		.scan    = ati_x10,
83 		.size    = ARRAY_SIZE(ati_x10),
84 		.rc_type = RC_TYPE_OTHER,
85 		.name    = RC_MAP_ATI_X10,
86 	}
87 };
88 
89 static int __init init_rc_map_ati_x10(void)
90 {
91 	return rc_map_register(&ati_x10_map);
92 }
93 
94 static void __exit exit_rc_map_ati_x10(void)
95 {
96 	rc_map_unregister(&ati_x10_map);
97 }
98 
99 module_init(init_rc_map_ati_x10)
100 module_exit(exit_rc_map_ati_x10)
101 
102 MODULE_LICENSE("GPL");
103 MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
104