1/* keytable for Terratec Cinergy C PCI Remote Controller
2 *
3 * Copyright (c) 2010 by Igor M. Liplianin <liplianin@me.by>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 */
10
11#include <media/rc-map.h>
12#include <linux/module.h>
13
14static struct rc_map_table terratec_cinergy_c_pci[] = {
15	{ 0x3e, KEY_POWER},
16	{ 0x3d, KEY_1},
17	{ 0x3c, KEY_2},
18	{ 0x3b, KEY_3},
19	{ 0x3a, KEY_4},
20	{ 0x39, KEY_5},
21	{ 0x38, KEY_6},
22	{ 0x37, KEY_7},
23	{ 0x36, KEY_8},
24	{ 0x35, KEY_9},
25	{ 0x34, KEY_VIDEO_NEXT}, /* AV */
26	{ 0x33, KEY_0},
27	{ 0x32, KEY_REFRESH},
28	{ 0x30, KEY_EPG},
29	{ 0x2f, KEY_UP},
30	{ 0x2e, KEY_LEFT},
31	{ 0x2d, KEY_OK},
32	{ 0x2c, KEY_RIGHT},
33	{ 0x2b, KEY_DOWN},
34	{ 0x29, KEY_INFO},
35	{ 0x28, KEY_RED},
36	{ 0x27, KEY_GREEN},
37	{ 0x26, KEY_YELLOW},
38	{ 0x25, KEY_BLUE},
39	{ 0x24, KEY_CHANNELUP},
40	{ 0x23, KEY_VOLUMEUP},
41	{ 0x22, KEY_MUTE},
42	{ 0x21, KEY_VOLUMEDOWN},
43	{ 0x20, KEY_CHANNELDOWN},
44	{ 0x1f, KEY_PAUSE},
45	{ 0x1e, KEY_HOME},
46	{ 0x1d, KEY_MENU}, /* DVD Menu */
47	{ 0x1c, KEY_SUBTITLE},
48	{ 0x1b, KEY_TEXT}, /* Teletext */
49	{ 0x1a, KEY_DELETE},
50	{ 0x19, KEY_TV},
51	{ 0x18, KEY_DVD},
52	{ 0x17, KEY_STOP},
53	{ 0x16, KEY_VIDEO},
54	{ 0x15, KEY_AUDIO}, /* Music */
55	{ 0x14, KEY_SCREEN}, /* Pic */
56	{ 0x13, KEY_PLAY},
57	{ 0x12, KEY_BACK},
58	{ 0x11, KEY_REWIND},
59	{ 0x10, KEY_FASTFORWARD},
60	{ 0x0b, KEY_PREVIOUS},
61	{ 0x07, KEY_RECORD},
62	{ 0x03, KEY_NEXT},
63
64};
65
66static struct rc_map_list terratec_cinergy_c_pci_map = {
67	.map = {
68		.scan    = terratec_cinergy_c_pci,
69		.size    = ARRAY_SIZE(terratec_cinergy_c_pci),
70		.rc_type = RC_TYPE_UNKNOWN,	/* Legacy IR type */
71		.name    = RC_MAP_TERRATEC_CINERGY_C_PCI,
72	}
73};
74
75static int __init init_rc_map_terratec_cinergy_c_pci(void)
76{
77	return rc_map_register(&terratec_cinergy_c_pci_map);
78}
79
80static void __exit exit_rc_map_terratec_cinergy_c_pci(void)
81{
82	rc_map_unregister(&terratec_cinergy_c_pci_map);
83}
84
85module_init(init_rc_map_terratec_cinergy_c_pci);
86module_exit(exit_rc_map_terratec_cinergy_c_pci);
87
88MODULE_LICENSE("GPL");
89