Linux-libre 5.4.48-gnu
[librecmc/linux-libre.git] / drivers / media / rc / keymaps / rc-terratec-cinergy-c-pci.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* keytable for Terratec Cinergy C PCI Remote Controller
3  *
4  * Copyright (c) 2010 by Igor M. Liplianin <liplianin@me.by>
5  */
6
7 #include <media/rc-map.h>
8 #include <linux/module.h>
9
10 static struct rc_map_table terratec_cinergy_c_pci[] = {
11         { 0x3e, KEY_POWER},
12         { 0x3d, KEY_NUMERIC_1},
13         { 0x3c, KEY_NUMERIC_2},
14         { 0x3b, KEY_NUMERIC_3},
15         { 0x3a, KEY_NUMERIC_4},
16         { 0x39, KEY_NUMERIC_5},
17         { 0x38, KEY_NUMERIC_6},
18         { 0x37, KEY_NUMERIC_7},
19         { 0x36, KEY_NUMERIC_8},
20         { 0x35, KEY_NUMERIC_9},
21         { 0x34, KEY_VIDEO_NEXT}, /* AV */
22         { 0x33, KEY_NUMERIC_0},
23         { 0x32, KEY_REFRESH},
24         { 0x30, KEY_EPG},
25         { 0x2f, KEY_UP},
26         { 0x2e, KEY_LEFT},
27         { 0x2d, KEY_OK},
28         { 0x2c, KEY_RIGHT},
29         { 0x2b, KEY_DOWN},
30         { 0x29, KEY_INFO},
31         { 0x28, KEY_RED},
32         { 0x27, KEY_GREEN},
33         { 0x26, KEY_YELLOW},
34         { 0x25, KEY_BLUE},
35         { 0x24, KEY_CHANNELUP},
36         { 0x23, KEY_VOLUMEUP},
37         { 0x22, KEY_MUTE},
38         { 0x21, KEY_VOLUMEDOWN},
39         { 0x20, KEY_CHANNELDOWN},
40         { 0x1f, KEY_PAUSE},
41         { 0x1e, KEY_HOME},
42         { 0x1d, KEY_MENU}, /* DVD Menu */
43         { 0x1c, KEY_SUBTITLE},
44         { 0x1b, KEY_TEXT}, /* Teletext */
45         { 0x1a, KEY_DELETE},
46         { 0x19, KEY_TV},
47         { 0x18, KEY_DVD},
48         { 0x17, KEY_STOP},
49         { 0x16, KEY_VIDEO},
50         { 0x15, KEY_AUDIO}, /* Music */
51         { 0x14, KEY_SCREEN}, /* Pic */
52         { 0x13, KEY_PLAY},
53         { 0x12, KEY_BACK},
54         { 0x11, KEY_REWIND},
55         { 0x10, KEY_FASTFORWARD},
56         { 0x0b, KEY_PREVIOUS},
57         { 0x07, KEY_RECORD},
58         { 0x03, KEY_NEXT},
59
60 };
61
62 static struct rc_map_list terratec_cinergy_c_pci_map = {
63         .map = {
64                 .scan     = terratec_cinergy_c_pci,
65                 .size     = ARRAY_SIZE(terratec_cinergy_c_pci),
66                 .rc_proto = RC_PROTO_UNKNOWN,   /* Legacy IR type */
67                 .name     = RC_MAP_TERRATEC_CINERGY_C_PCI,
68         }
69 };
70
71 static int __init init_rc_map_terratec_cinergy_c_pci(void)
72 {
73         return rc_map_register(&terratec_cinergy_c_pci_map);
74 }
75
76 static void __exit exit_rc_map_terratec_cinergy_c_pci(void)
77 {
78         rc_map_unregister(&terratec_cinergy_c_pci_map);
79 }
80
81 module_init(init_rc_map_terratec_cinergy_c_pci);
82 module_exit(exit_rc_map_terratec_cinergy_c_pci);
83
84 MODULE_LICENSE("GPL");